blob: 33dc531d5ff714497ceea03d7dd8d0a760cee63d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef ADVICE_H_5934AC1B
#define ADVICE_H_5934AC1B
#include <random>
#include <twitter.h>
#include <verbly.h>
#include <string>
#include <memory>
#include <Magick++.h>
#include <stdexcept>
#include "sentence.h"
class advice {
public:
advice(
std::string configFile,
std::mt19937& rng);
void run() const;
private:
class could_not_get_images : public std::runtime_error {
public:
could_not_get_images() : std::runtime_error("Could not get images for noun")
{
}
};
verbly::word generateImageNoun() const;
Magick::Image getImageForNoun(verbly::word pictured) const;
Magick::Image layoutImage(Magick::Image bg, std::string title) const;
void sendTweet(Magick::Image pic, std::string title) const;
std::mt19937& rng_;
std::unique_ptr<verbly::database> database_;
std::unique_ptr<sentence> generator_;
std::unique_ptr<twitter::client> client_;
};
#endif /* end of include guard: ADVICE_H_5934AC1B */
|