-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost_test.py
35 lines (24 loc) · 875 Bytes
/
post_test.py
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
import os
import sys
from numpy import random
_cdir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(_cdir)
import config
from memory.memory import Memory
from posting.packet import Packet
from posting.twitterposter import TwitterPoster
from picker.pickerManager import PickerManager, PickerType
from frames.frameManager import FrameManager, FrameType
from format.formatter import Formatter
memory = Memory()
n = random.choice(config.NUMS, p=config.DIST)
# Pick a colour picker and then get n colours
picker = PickerManager.getPicker(PickerType.THEME, 3, subtype="Feelings of Home")
colours = picker.getColours()
# Get a frame for n colours of a particular type
frame = FrameManager.getRandomFrame(FrameType.ALL, 3)
f = Formatter(frame)
f.saveImages(colours)
# packet = Packet(picker, frame, colours)
# poster = FacebookPoster()
# poster.post(packet)