From 43e74c07a195738ce44c0f9628bc9795f623b2e0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 4 Jan 2017 10:54:11 -0500 Subject: Forked repository to make fruity --- owo.cpp | 58 ---------------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 owo.cpp (limited to 'owo.cpp') diff --git a/owo.cpp b/owo.cpp deleted file mode 100644 index f66e689..0000000 --- a/owo.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char** argv) -{ - if (argc != 2) - { - std::cout << "usage: owo [configfile]" << std::endl; - return -1; - } - - std::string configfile(argv[1]); - YAML::Node config = YAML::LoadFile(configfile); - - twitter::auth auth; - auth.setConsumerKey(config["consumer_key"].as()); - auth.setConsumerSecret(config["consumer_secret"].as()); - auth.setAccessKey(config["access_key"].as()); - auth.setAccessSecret(config["access_secret"].as()); - - twitter::client client(auth); - - verbly::data database {config["verbly_datafile"].as()}; - - verbly::noun bp = database.nouns().with_wnid(105220461).run().front(); // body part - verbly::noun pp = database.nouns().with_wnid(104723816).run().front(); // quality - verbly::noun cp = database.nouns().with_wnid(103051540).run().front(); // clothing - verbly::filter filt {bp, pp, cp}; - filt.set_orlogic(true); - - for (;;) - { - std::cout << "Generating tweet" << std::endl; - - auto ns = database.nouns().full_hyponym_of(filt).is_not_proper().random().limit(1).run(); - verbly::noun n = ns.front(); - - std::string result = "*notices ur " + n.base_form() + "* OwO whats this..?"; - result.resize(140); - - try - { - client.updateStatus(result); - } catch (const twitter::twitter_error& e) - { - std::cout << "Twitter error: " << e.what() << std::endl; - } - - std::cout << result << std::endl; - - std::this_thread::sleep_for(std::chrono::hours(1)); - } -} -- cgit 1.4.1