diff options
Diffstat (limited to 'owo.cpp')
-rw-r--r-- | owo.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/owo.cpp b/owo.cpp index d6b3043..f66e689 100644 --- a/owo.cpp +++ b/owo.cpp | |||
@@ -8,7 +8,14 @@ | |||
8 | 8 | ||
9 | int main(int argc, char** argv) | 9 | int main(int argc, char** argv) |
10 | { | 10 | { |
11 | YAML::Node config = YAML::LoadFile("config.yml"); | 11 | if (argc != 2) |
12 | { | ||
13 | std::cout << "usage: owo [configfile]" << std::endl; | ||
14 | return -1; | ||
15 | } | ||
16 | |||
17 | std::string configfile(argv[1]); | ||
18 | YAML::Node config = YAML::LoadFile(configfile); | ||
12 | 19 | ||
13 | twitter::auth auth; | 20 | twitter::auth auth; |
14 | auth.setConsumerKey(config["consumer_key"].as<std::string>()); | 21 | auth.setConsumerKey(config["consumer_key"].as<std::string>()); |
@@ -18,7 +25,7 @@ int main(int argc, char** argv) | |||
18 | 25 | ||
19 | twitter::client client(auth); | 26 | twitter::client client(auth); |
20 | 27 | ||
21 | verbly::data database {"data.sqlite3"}; | 28 | verbly::data database {config["verbly_datafile"].as<std::string>()}; |
22 | 29 | ||
23 | verbly::noun bp = database.nouns().with_wnid(105220461).run().front(); // body part | 30 | verbly::noun bp = database.nouns().with_wnid(105220461).run().front(); // body part |
24 | verbly::noun pp = database.nouns().with_wnid(104723816).run().front(); // quality | 31 | verbly::noun pp = database.nouns().with_wnid(104723816).run().front(); // quality |