summary refs log tree commit diff stats
path: root/father.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-11-08 16:00:46 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-11-08 16:00:46 -0500
commitd3fa75b217f088c78590fcefbdad57e44626ba0b (patch)
treece3091b42718acb3b542350c72ef748df0d4eb07 /father.cpp
parent95b7ae535c0b005466e34096f5ce427046a403d2 (diff)
downloadfather-d3fa75b217f088c78590fcefbdad57e44626ba0b.tar.gz
father-d3fa75b217f088c78590fcefbdad57e44626ba0b.tar.bz2
father-d3fa75b217f088c78590fcefbdad57e44626ba0b.zip
Updated verbly (datafile versioning)
Diffstat (limited to 'father.cpp')
-rw-r--r--father.cpp15
1 files changed, 9 insertions, 6 deletions
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)
73 std::string configfile(argv[1]); 73 std::string configfile(argv[1]);
74 YAML::Node config = YAML::LoadFile(configfile); 74 YAML::Node config = YAML::LoadFile(configfile);
75 75
76 verbly::database database(config["verbly_datafile"].as<std::string>());
77
76 twitter::auth auth; 78 twitter::auth auth;
77 auth.setConsumerKey(config["consumer_key"].as<std::string>()); 79 auth.setConsumerKey(config["consumer_key"].as<std::string>());
78 auth.setConsumerSecret(config["consumer_secret"].as<std::string>()); 80 auth.setConsumerSecret(config["consumer_secret"].as<std::string>());
@@ -81,8 +83,6 @@ int main(int argc, char** argv)
81 83
82 std::set<twitter::user_id> streamedFriends; 84 std::set<twitter::user_id> streamedFriends;
83 85
84 verbly::database database(config["verbly_datafile"].as<std::string>());
85
86 twitter::client client(auth); 86 twitter::client client(auth);
87 87
88 std::cout << "Starting streaming..." << std::endl; 88 std::cout << "Starting streaming..." << std::endl;
@@ -155,8 +155,8 @@ int main(int argc, char** argv)
155 155
156 if (secondAdjective.isValid()) 156 if (secondAdjective.isValid())
157 { 157 {
158 name << verbly::token::capitalize(firstAdverb); 158 name << firstAdverb;
159 name << verbly::token::capitalize(secondAdjective); 159 name << secondAdjective;
160 } 160 }
161 } 161 }
162 } 162 }
@@ -170,7 +170,7 @@ int main(int argc, char** argv)
170 170
171 if (firstAdjective.isValid()) 171 if (firstAdjective.isValid())
172 { 172 {
173 name = verbly::token::capitalize(firstAdjective); 173 name = firstAdjective;
174 } 174 }
175 } 175 }
176 176
@@ -179,7 +179,10 @@ int main(int argc, char** argv)
179 { 179 {
180 verbly::token action = { 180 verbly::token action = {
181 "Hi", 181 "Hi",
182 verbly::token::punctuation(",", name), 182 verbly::token::punctuation(",",
183 verbly::token::capitalize(
184 verbly::token::casing::title_case,
185 name)),
183 "I'm Dad."}; 186 "I'm Dad."};
184 187
185 std::string result = 188 std::string result =