summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-12-14 02:19:59 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-12-14 02:19:59 -0500
commit99fe6c21ad757c41e4c082fadaa47c79a93c10c5 (patch)
tree60463518d15a36ad4ef235dc2e77066bb3d3295e
parentcfab478279732f86476e361e937da5fde495d326 (diff)
downloadtoldya-99fe6c21ad757c41e4c082fadaa47c79a93c10c5.tar.gz
toldya-99fe6c21ad757c41e4c082fadaa47c79a93c10c5.tar.bz2
toldya-99fe6c21ad757c41e4c082fadaa47c79a93c10c5.zip
Bot now takes path to config file as argument
-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>());