-
Notifications
You must be signed in to change notification settings - Fork 7
/
design
52 lines (37 loc) · 787 Bytes
/
design
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
47
48
49
50
51
52
Bot:
id
name (used as subdirectory name to load other config)
next_post_time
posts
Post:
id
bot_id
text
date
binaries
deliveries
Delivery:
id
date
post_id
service
external_id
error
Binary:
filename (within directory based on bot config and post date)
Bots are loaded from subdirectories. Each has an __init__.py and a config.yaml
for bot in bots:
if bot.should_post():
bot.post()
post() generates the post, sends it to all deliveries
You can also fill the posts table with unposted posts. If there are unposted
posts, post() will choose one and post it rather than calling out to
the submodule code.
# Should post?
Just look at next post time
Next post time is calculated after a successful post
# Deliveries
Twitter
Mastodon
Web page
Atom archive feed