From d3fa75b217f088c78590fcefbdad57e44626ba0b Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 8 Nov 2017 16:00:46 -0500 Subject: Updated verbly (datafile versioning) --- father.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'father.cpp') diff --git a/father.cpp b/father.cpp index 7ea5080..198b38a 100644 --- a/father.cpp +++ b/father.cpp @@ -73,6 +73,8 @@ int main(int argc, char** argv) std::string configfile(argv[1]); YAML::Node config = YAML::LoadFile(configfile); + verbly::database database(config["verbly_datafile"].as()); + twitter::auth auth; auth.setConsumerKey(config["consumer_key"].as()); auth.setConsumerSecret(config["consumer_secret"].as()); @@ -81,8 +83,6 @@ int main(int argc, char** argv) std::set streamedFriends; - verbly::database database(config["verbly_datafile"].as()); - twitter::client client(auth); std::cout << "Starting streaming..." << std::endl; @@ -155,8 +155,8 @@ int main(int argc, char** argv) if (secondAdjective.isValid()) { - name << verbly::token::capitalize(firstAdverb); - name << verbly::token::capitalize(secondAdjective); + name << firstAdverb; + name << secondAdjective; } } } @@ -170,7 +170,7 @@ int main(int argc, char** argv) if (firstAdjective.isValid()) { - name = verbly::token::capitalize(firstAdjective); + name = firstAdjective; } } @@ -179,7 +179,10 @@ int main(int argc, char** argv) { verbly::token action = { "Hi", - verbly::token::punctuation(",", name), + verbly::token::punctuation(",", + verbly::token::capitalize( + verbly::token::casing::title_case, + name)), "I'm Dad."}; std::string result = -- cgit 1.4.1