From e802d9978aa6302e229357d5fc692726994569e5 Mon Sep 17 00:00:00 2001 From: Feffernoose Date: Tue, 8 Oct 2013 12:48:05 -0400 Subject: Added user-configurble delay between tweets in rawr-ebooks Also changed default delay from 15 minutes to 1 hour --- ebooks.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ebooks.cpp') diff --git a/ebooks.cpp b/ebooks.cpp index 753ead6..2dbf5e4 100644 --- a/ebooks.cpp +++ b/ebooks.cpp @@ -18,7 +18,9 @@ int main(int argc, char** args) { srand(time(NULL)); - YAML::Node config = YAML::LoadFile("config.yml"); + YAML::Node config = YAML::LoadFile("config.yml"); + int delay = config["corpus"].as(); + ifstream infile(config["corpus"].as().c_str()); string corpus; string line; @@ -168,7 +170,7 @@ int main(int argc, char** args) printf( "\ntwitterClient:: twitCurl::statusUpdate error:\n%s\n", replyMsg.c_str() ); } - sleep(900); + sleep(delay); } return 0; -- cgit 1.4.1