From bd8ff4083d41417f014241ddb94e43b39bee6080 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 10 Apr 2017 11:35:55 -0400 Subject: Updated verbly (new API) Also updated libtwitter++, and blacklisted some problematic images. --- main.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 main.cpp (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..1b49563 --- /dev/null +++ b/main.cpp @@ -0,0 +1,35 @@ +#include "difference.h" + +int main(int argc, char** argv) +{ + Magick::InitializeMagick(nullptr); + + std::random_device randomDevice; + std::mt19937 rng(randomDevice()); + + if (argc != 2) + { + std::cout << "usage: difference [configfile]" << std::endl; + return -1; + } + + std::string configfile(argv[1]); + + try + { + difference bot(configfile, rng); + + try + { + bot.run(); + } catch (const std::exception& ex) + { + std::cout << "Error running bot: " << ex.what() << std::endl; + } + } catch (const std::exception& ex) + { + std::cout << "Error initializing bot: " << ex.what() << std::endl; + } + + return 0; +} -- cgit 1.4.1