summary refs log tree commit diff stats
path: root/generator/main.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-12-02 17:03:54 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2023-12-02 17:03:54 -0500
commit90fbd47ca02f1a723134302ca978a7f9ef0eac04 (patch)
tree759a8d906ae903dbe088e078ac7bd71a080fdad5 /generator/main.cpp
parent691e37d46f55c36d85f82d261f002bb03b82f11b (diff)
downloadlingo-randomizer-90fbd47ca02f1a723134302ca978a7f9ef0eac04.tar.gz
lingo-randomizer-90fbd47ca02f1a723134302ca978a7f9ef0eac04.tar.bz2
lingo-randomizer-90fbd47ca02f1a723134302ca978a7f9ef0eac04.zip
Starting to get some puzzles randomized
Diffstat (limited to 'generator/main.cpp')
-rw-r--r--generator/main.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/generator/main.cpp b/generator/main.cpp new file mode 100644 index 0000000..c958421 --- /dev/null +++ b/generator/main.cpp
@@ -0,0 +1,35 @@
1#include <exception>
2#include <iostream>
3
4#include "generator.h"
5
6void printUsage() {
7 std::cout << "usage: generator agid wordnet cmudict wordfreq output"
8 << std::endl;
9 std::cout << "agid :: path to an AGID infl.txt file" << std::endl;
10 std::cout << "wordnet :: path to a WordNet prolog data directory"
11 << std::endl;
12 std::cout << "cmudict :: path to a CMUDICT pronunciation file" << std::endl;
13 std::cout << "wordfreq :: path to a word frequency CSV file" << std::endl;
14 std::cout << "output :: datafile output path" << std::endl;
15}
16
17int main(int argc, char** argv) {
18 if (argc == 6) {
19 try {
20 generator app(argv[1], argv[2], argv[3], argv[4], argv[5]);
21
22 try {
23 app.run();
24 } catch (const std::exception& e) {
25 std::cout << e.what() << std::endl;
26 }
27 } catch (const std::exception& e) {
28 std::cout << e.what() << std::endl;
29 printUsage();
30 }
31 } else {
32 std::cout << "lingo randomizer generator" << std::endl;
33 printUsage();
34 }
35}