Skip to content

Commit af382fa

Browse files
committed
Move potato data to data/potato.json
1 parent d0f8cd9 commit af382fa

2 files changed

Lines changed: 281 additions & 42 deletions

File tree

data/potato.json

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
{
2+
"templates": [
3+
"{method} a {flavor} {size} {type} potato for {user} and serves it with a small {side}!"
4+
],
5+
"parts": {
6+
"method": [
7+
"bakes",
8+
"fries",
9+
"boils",
10+
"roasts"
11+
],
12+
"flavor": [
13+
"tasty",
14+
"delectable",
15+
"delicious",
16+
"yummy",
17+
"toothsome",
18+
"scrumptious",
19+
"luscious"
20+
],
21+
"size": [
22+
"small",
23+
"little",
24+
"mid-sized",
25+
"medium-sized",
26+
"large",
27+
"gigantic"
28+
],
29+
"type": [
30+
"AC Belmont",
31+
"AC Blue Pride",
32+
"AC Brador",
33+
"AC Chaleur",
34+
"AC Domino",
35+
"AC Dubuc",
36+
"AC Glacier Chip",
37+
"AC Maple Gold",
38+
"AC Novachip",
39+
"AC Peregrine Red",
40+
"AC Ptarmigan",
41+
"AC Red Island",
42+
"AC Saguenor",
43+
"AC Stampede Russet",
44+
"AC Sunbury",
45+
"Abeille",
46+
"Abnaki",
47+
"Acadia",
48+
"Acadia Russet",
49+
"Accent",
50+
"Adirondack Blue",
51+
"Adirondack Red",
52+
"Adora",
53+
"Agria",
54+
"All Blue",
55+
"All Red",
56+
"Alpha",
57+
"Alta Russet",
58+
"Alturas Russet",
59+
"Amandine",
60+
"Amisk",
61+
"Andover",
62+
"Anoka",
63+
"Anson",
64+
"Aquilon",
65+
"Arran Consul",
66+
"Asterix",
67+
"Atlantic",
68+
"Austrian Crescent",
69+
"Avalanche",
70+
"Banana",
71+
"Bannock Russet",
72+
"Batoche",
73+
"BeRus",
74+
"Belle De Fonteney",
75+
"Belleisle",
76+
"Bintje",
77+
"Blossom",
78+
"Blue Christie",
79+
"Blue Mac",
80+
"Brigus",
81+
"Brise du Nord",
82+
"Butte",
83+
"Butterfinger",
84+
"Caesar",
85+
"CalWhite",
86+
"CalRed",
87+
"Caribe",
88+
"Carlingford",
89+
"Carlton",
90+
"Carola",
91+
"Cascade",
92+
"Castile",
93+
"Centennial Russet",
94+
"Century Russet",
95+
"Charlotte",
96+
"Cherie",
97+
"Cherokee",
98+
"Cherry Red",
99+
"Chieftain",
100+
"Chipeta",
101+
"Coastal Russet",
102+
"Colorado Rose",
103+
"Concurrent",
104+
"Conestoga",
105+
"Cowhorn",
106+
"Crestone Russet",
107+
"Crispin",
108+
"Cupids",
109+
"Daisy Gold",
110+
"Dakota Pearl",
111+
"Defender",
112+
"Delikat",
113+
"Denali",
114+
"Desiree",
115+
"Divina",
116+
"Dundrod",
117+
"Durango Red",
118+
"Early Rose",
119+
"Elba",
120+
"Envol",
121+
"Epicure",
122+
"Eramosa",
123+
"Estima",
124+
"Eva",
125+
"Fabula",
126+
"Fambo",
127+
"Fremont Russet",
128+
"French Fingerling",
129+
"Frontier Russet",
130+
"Fundy",
131+
"Garnet Chile",
132+
"Gem Russet",
133+
"GemStar Russet",
134+
"Gemchip",
135+
"German Butterball",
136+
"Gigant",
137+
"Goldrush",
138+
"Granola",
139+
"Green Mountain",
140+
"Haida",
141+
"Hertha",
142+
"Hilite Russet",
143+
"Huckleberry",
144+
"Hunter",
145+
"Huron",
146+
"IdaRose",
147+
"Innovator",
148+
"Irish Cobbler",
149+
"Island Sunshine",
150+
"Ivory Crisp",
151+
"Jacqueline Lee",
152+
"Jemseg",
153+
"Kanona",
154+
"Katahdin",
155+
"Kennebec",
156+
"Kerr's Pink",
157+
"Keswick",
158+
"Keuka Gold",
159+
"Keystone Russet",
160+
"King Edward VII",
161+
"Kipfel",
162+
"Klamath Russet",
163+
"Krantz",
164+
"LaRatte",
165+
"Lady Rosetta",
166+
"Latona",
167+
"Lemhi Russet",
168+
"Liberator",
169+
"Lili",
170+
"MaineChip",
171+
"Marfona",
172+
"Maris Bard",
173+
"Maris Piper",
174+
"Matilda",
175+
"Mazama",
176+
"McIntyre",
177+
"Michigan Purple",
178+
"Millenium Russet",
179+
"Mirton Pearl",
180+
"Modoc",
181+
"Mondial",
182+
"Monona",
183+
"Morene",
184+
"Morning Gold",
185+
"Mouraska",
186+
"Navan",
187+
"Nicola",
188+
"Nipigon",
189+
"Niska",
190+
"Nooksack",
191+
"NorValley",
192+
"Norchip",
193+
"Nordonna",
194+
"Norgold Russet",
195+
"Norking Russet",
196+
"Norland",
197+
"Norwis",
198+
"Obelix",
199+
"Ozette",
200+
"Peanut",
201+
"Penta",
202+
"Peribonka",
203+
"Peruvian Purple",
204+
"Pike",
205+
"Pink Pearl",
206+
"Prospect",
207+
"Pungo",
208+
"Purple Majesty",
209+
"Purple Viking",
210+
"Ranger Russet",
211+
"Reba",
212+
"Red Cloud",
213+
"Red Gold",
214+
"Red La Soda",
215+
"Red Pontiac",
216+
"Red Ruby",
217+
"Red Thumb",
218+
"Redsen",
219+
"Rocket",
220+
"Rose Finn Apple",
221+
"Rose Gold",
222+
"Roselys",
223+
"Rote Erstling",
224+
"Ruby Crescent",
225+
"Russet Burbank",
226+
"Russet Legend",
227+
"Russet Norkotah",
228+
"Russet Nugget",
229+
"Russian Banana",
230+
"Saginaw Gold",
231+
"Sangre",
232+
"Satina",
233+
"Saxon",
234+
"Sebago",
235+
"Shepody",
236+
"Sierra",
237+
"Silverton Russet",
238+
"Simcoe",
239+
"Snowden",
240+
"Spunta",
241+
"St. John's",
242+
"Summit Russet",
243+
"Sunrise",
244+
"Superior",
245+
"Symfonia",
246+
"Tolaas",
247+
"Trent",
248+
"True Blue",
249+
"Ulla",
250+
"Umatilla Russet",
251+
"Valisa",
252+
"Van Gogh",
253+
"Viking",
254+
"Wallowa Russet",
255+
"Warba",
256+
"Western Russet",
257+
"White Rose",
258+
"Willamette",
259+
"Winema",
260+
"Yellow Finn",
261+
"Yukon Gold"
262+
],
263+
"side": [
264+
"side salad",
265+
"dollop of sour cream",
266+
"piece of chicken",
267+
"bowl of shredded bacon"
268+
]
269+
}
270+
}

plugins/foods.py

Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,6 @@
1414
'Biscotti', 'Oatmeal Cranberry', 'Chocolate Fudge', 'Peanut Butter', 'Pumpkin', 'Lemon Bar',
1515
'Chocolate Oatmeal Fudge', 'Toffee Peanut', 'Danish Sugar', 'Triple Chocolate', 'Oreo']
1616

17-
# <Luke> Hey guys, any good ideas for plugins?
18-
# <User> I don't know, something that lists every potato known to man?
19-
# <Luke> BRILLIANT
20-
potatoes = ['AC Belmont', 'AC Blue Pride', 'AC Brador', 'AC Chaleur', 'AC Domino', 'AC Dubuc', 'AC Glacier Chip',
21-
'AC Maple Gold', 'AC Novachip', 'AC Peregrine Red', 'AC Ptarmigan', 'AC Red Island', 'AC Saguenor',
22-
'AC Stampede Russet', 'AC Sunbury', 'Abeille', 'Abnaki', 'Acadia', 'Acadia Russet', 'Accent',
23-
'Adirondack Blue', 'Adirondack Red', 'Adora', 'Agria', 'All Blue', 'All Red', 'Alpha', 'Alta Russet',
24-
'Alturas Russet', 'Amandine', 'Amisk', 'Andover', 'Anoka', 'Anson', 'Aquilon', 'Arran Consul', 'Asterix',
25-
'Atlantic', 'Austrian Crescent', 'Avalanche', 'Banana', 'Bannock Russet', 'Batoche', 'BeRus',
26-
'Belle De Fonteney', 'Belleisle', 'Bintje', 'Blossom', 'Blue Christie', 'Blue Mac', 'Brigus',
27-
'Brise du Nord', 'Butte', 'Butterfinger', 'Caesar', 'CalWhite', 'CalRed', 'Caribe', 'Carlingford',
28-
'Carlton', 'Carola', 'Cascade', 'Castile', 'Centennial Russet', 'Century Russet', 'Charlotte', 'Cherie',
29-
'Cherokee', 'Cherry Red', 'Chieftain', 'Chipeta', 'Coastal Russet', 'Colorado Rose', 'Concurrent',
30-
'Conestoga', 'Cowhorn', 'Crestone Russet', 'Crispin', 'Cupids', 'Daisy Gold', 'Dakota Pearl', 'Defender',
31-
'Delikat', 'Denali', 'Desiree', 'Divina', 'Dundrod', 'Durango Red', 'Early Rose', 'Elba', 'Envol',
32-
'Epicure', 'Eramosa', 'Estima', 'Eva', 'Fabula', 'Fambo', 'Fremont Russet', 'French Fingerling',
33-
'Frontier Russet', 'Fundy', 'Garnet Chile', 'Gem Russet', 'GemStar Russet', 'Gemchip', 'German Butterball',
34-
'Gigant', 'Goldrush', 'Granola', 'Green Mountain', 'Haida', 'Hertha', 'Hilite Russet', 'Huckleberry',
35-
'Hunter', 'Huron', 'IdaRose', 'Innovator', 'Irish Cobbler', 'Island Sunshine', 'Ivory Crisp',
36-
'Jacqueline Lee', 'Jemseg', 'Kanona', 'Katahdin', 'Kennebec', "Kerr's Pink", 'Keswick', 'Keuka Gold',
37-
'Keystone Russet', 'King Edward VII', 'Kipfel', 'Klamath Russet', 'Krantz', 'LaRatte', 'Lady Rosetta',
38-
'Latona', 'Lemhi Russet', 'Liberator', 'Lili', 'MaineChip', 'Marfona', 'Maris Bard', 'Maris Piper',
39-
'Matilda', 'Mazama', 'McIntyre', 'Michigan Purple', 'Millenium Russet', 'Mirton Pearl', 'Modoc', 'Mondial',
40-
'Monona', 'Morene', 'Morning Gold', 'Mouraska', 'Navan', 'Nicola', 'Nipigon', 'Niska', 'Nooksack',
41-
'NorValley', 'Norchip', 'Nordonna', 'Norgold Russet', 'Norking Russet', 'Norland', 'Norwis', 'Obelix',
42-
'Ozette', 'Peanut', 'Penta', 'Peribonka', 'Peruvian Purple', 'Pike', 'Pink Pearl', 'Prospect', 'Pungo',
43-
'Purple Majesty', 'Purple Viking', 'Ranger Russet', 'Reba', 'Red Cloud', 'Red Gold', 'Red La Soda',
44-
'Red Pontiac', 'Red Ruby', 'Red Thumb', 'Redsen', 'Rocket', 'Rose Finn Apple', 'Rose Gold', 'Roselys',
45-
'Rote Erstling', 'Ruby Crescent', 'Russet Burbank', 'Russet Legend', 'Russet Norkotah', 'Russet Nugget',
46-
'Russian Banana', 'Saginaw Gold', 'Sangre', 'Satina', 'Saxon', 'Sebago', 'Shepody', 'Sierra',
47-
'Silverton Russet', 'Simcoe', 'Snowden', 'Spunta', "St. John's", 'Summit Russet', 'Sunrise', 'Superior',
48-
'Symfonia', 'Tolaas', 'Trent', 'True Blue', 'Ulla', 'Umatilla Russet', 'Valisa', 'Van Gogh', 'Viking',
49-
'Wallowa Russet', 'Warba', 'Western Russet', 'White Rose', 'Willamette', 'Winema', 'Yellow Finn',
50-
'Yukon Gold']
51-
5217

5318
sandwich_data = {}
5419
taco_data = {}
@@ -77,6 +42,7 @@
7742
milkshake_data = {}
7843
kebab_data = {}
7944
cake_data = {}
45+
potato_data = {}
8046

8147

8248
def is_valid(target):
@@ -126,25 +92,28 @@ def load_foods(bot):
12692
load_template_data(bot, "milkshake.json", milkshake_data)
12793
load_template_data(bot, "kebab.json", kebab_data)
12894
load_template_data(bot, "cake.json", cake_data)
95+
load_template_data(bot, "potato.json", potato_data)
12996

13097

13198
@asyncio.coroutine
13299
@hook.command
133100
def potato(text, action):
134101
"""<user> - makes <user> a tasty little potato"""
102+
# Kept for posterity
103+
# <Luke> Hey guys, any good ideas for plugins?
104+
# <User> I don't know, something that lists every potato known to man?
105+
# <Luke> BRILLIANT
135106
user = text.strip()
136107

137108
if not is_valid(user):
138109
return "I can't give a potato to that user."
139110

140-
potato_type = random.choice(potatoes)
141-
size = random.choice(['small', 'little', 'mid-sized', 'medium-sized', 'large', 'gigantic'])
142-
flavor = random.choice(['tasty', 'delectable', 'delicious', 'yummy', 'toothsome', 'scrumptious', 'luscious'])
143-
method = random.choice(['bakes', 'fries', 'boils', 'roasts'])
144-
side_dish = random.choice(['side salad', 'dollop of sour cream', 'piece of chicken', 'bowl of shredded bacon'])
111+
generator = textgen.TextGenerator(
112+
potato_data["templates"], potato_data["parts"], variables={"user": user}
113+
)
145114

146-
action("{} a {} {} {} potato for {} and serves it with a small {}!".format(method, flavor, size, potato_type, user,
147-
side_dish))
115+
# act out the message
116+
action(generator.generate_string())
148117

149118

150119
@asyncio.coroutine

0 commit comments

Comments
 (0)