diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-04-10 11:35:55 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-04-10 11:35:55 -0400 |
commit | bd8ff4083d41417f014241ddb94e43b39bee6080 (patch) | |
tree | 09ec764e995b53de78462b2fb996db5973d25aef /main.cpp | |
parent | 95e89d24d998c75dae191ceefbe17c0d44c2d78a (diff) | |
download | difference-bd8ff4083d41417f014241ddb94e43b39bee6080.tar.gz difference-bd8ff4083d41417f014241ddb94e43b39bee6080.tar.bz2 difference-bd8ff4083d41417f014241ddb94e43b39bee6080.zip |
Updated verbly (new API)
Also updated libtwitter++, and blacklisted some problematic images.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..1b49563 --- /dev/null +++ b/main.cpp | |||
@@ -0,0 +1,35 @@ | |||
1 | #include "difference.h" | ||
2 | |||
3 | int main(int argc, char** argv) | ||
4 | { | ||
5 | Magick::InitializeMagick(nullptr); | ||
6 | |||
7 | std::random_device randomDevice; | ||
8 | std::mt19937 rng(randomDevice()); | ||
9 | |||
10 | if (argc != 2) | ||
11 | { | ||
12 | std::cout << "usage: difference [configfile]" << std::endl; | ||
13 | return -1; | ||
14 | } | ||
15 | |||
16 | std::string configfile(argv[1]); | ||
17 | |||
18 | try | ||
19 | { | ||
20 | difference bot(configfile, rng); | ||
21 | |||
22 | try | ||
23 | { | ||
24 | bot.run(); | ||
25 | } catch (const std::exception& ex) | ||
26 | { | ||
27 | std::cout << "Error running bot: " << ex.what() << std::endl; | ||
28 | } | ||
29 | } catch (const std::exception& ex) | ||
30 | { | ||
31 | std::cout << "Error initializing bot: " << ex.what() << std::endl; | ||
32 | } | ||
33 | |||
34 | return 0; | ||
35 | } | ||