-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlunch.py
More file actions
33 lines (27 loc) · 756 Bytes
/
lunch.py
File metadata and controls
33 lines (27 loc) · 756 Bytes
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
import random
import text
import yelp
import os
messages = (
'It is lunch time.\n%s',
'Eat some lunch.\n%s',
'Get some lunch.\n%s',
)
def work():
message = random.choice(messages)
searches = yelp.search('lunch', os.environ['WORK_ADDRESS'])
biz = 'Try %s' % random.choice(searches)
out = message % biz
text.me(out)
def bub():
message = random.choice(messages)
searches = yelp.search('lunch', os.environ['BUB_WORK_ADDRESS'])
biz = 'Try %s' % random.choice(searches)
out = message % biz
text.bub(out)
def home():
message = random.choice(messages)
searches = yelp.search('lunch', os.environ['HOME_ADDRESS'])
biz = 'Try %s' % random.choice(searches)
out = message % biz
text.me(out)