From 7ba70196fd05a893a851f24a07868e3a1e9a7818 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 3 Mar 2017 18:17:37 -0500 Subject: Created bot --- grunge.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 grunge.h (limited to 'grunge.h') diff --git a/grunge.h b/grunge.h new file mode 100644 index 0000000..5f95442 --- /dev/null +++ b/grunge.h @@ -0,0 +1,49 @@ +#ifndef GRUNGE_H +#define GRUNGE_H + +#include +#include +#include +#include +#include +#include +#include + +class grunge { +public: + + grunge( + std::string configFile, + std::mt19937& rng); + + void run() const; + +private: + + verbly::word getPicturedNoun() const; + + Magick::Image getImageForNoun(verbly::word pictured) const; + + Magick::Image pixelateImage(Magick::Image image) const; + + Magick::Image pastelizeImage(Magick::Image image) const; + + std::string generateTweetText(verbly::word pictured) const; + + void sendTweet(std::string text, Magick::Image image) const; + + class could_not_get_images : public std::runtime_error { + public: + + could_not_get_images() : std::runtime_error("Could not get images for noun") + { + } + }; + + std::mt19937& rng_; + std::unique_ptr database_; + std::unique_ptr client_; + +}; + +#endif -- cgit 1.4.1