summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--toldya.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/toldya.cpp b/toldya.cpp index 5f05b20..d880c81 100644 --- a/toldya.cpp +++ b/toldya.cpp
@@ -9,7 +9,14 @@
9 9
10int main(int argc, char** argv) 10int main(int argc, char** argv)
11{ 11{
12 YAML::Node config = YAML::LoadFile("config.yml"); 12 if (argc != 2)
13 {
14 std::cout << "usage: toldya [configfile]" << std::endl;
15 return -1;
16 }
17
18 std::string configfile(argv[1]);
19 YAML::Node config = YAML::LoadFile(configfile);
13 20
14 twitter::auth auth; 21 twitter::auth auth;
15 auth.setConsumerKey(config["consumer_key"].as<std::string>()); 22 auth.setConsumerKey(config["consumer_key"].as<std::string>());