Skip to content

Commit

Permalink
Added new team to settigs and changed "time left" diplay to int
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcdowell committed Jan 26, 2013
1 parent 9d0a3cc commit 303e788
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def main():
if time_left > 0:
update_queue.enqueue(post)
print u'adding thread {0} to update queue {1} minutes left'.format(post[0].title,
time_left)
int(time_left))

if post_queue.empty() and update_queue.empty():
print '\nFinished!'
Expand Down
56 changes: 30 additions & 26 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,35 @@

# Special cases, where the team name does not fit the pattern in
# the Guardian's urls.
CHANGES = [('West Bromwich Albion', 'westbrom'),
('Manchester United', 'manchester-united'),
('Tottenham Hotspur', 'tottenham-hotspur'),
('FSV Mainz 05', 'fsvmainz'),
('Swansea City', 'swansea'),
('Queens Park Rangers', 'qpr'),
('Aston Villa', 'aston-villa'),
(u'M\xe1laga CF', 'malaga'),
('FC Barcelona', 'barcelona'),
(u'Atl\u00E9tico Madrid', 'atleticomadrid'),
('VfL Wolfsburg', 'wolfsburg'),
('VfB Stuttgart', 'stuttgart'),
('Shalke 04', 'shalke'),
('AS Roma', 'roma'),
('SC Freiburg', 'freiburg'),
('Getafe CF', 'getafe'),
('Valencia CF', 'valencia'),
(u"Borussia M\u2019gladbach", 'borussiamoenchengladbach'),
('RCD Mallorca', 'realmallorca'),
('Sevilla FC', 'sevilla'),
('Hamburger SV', 'hamburg'),
(u'1. FC N\u00FCrnberg', 'nurnberg'),
('SC Freiburg', 'freiburg'),
('Schalke 04', 'schalke'),
('Levante UD', 'levante')]
CHANGES = [
('AS Roma', 'roma'),
('Aston Villa', 'aston-villa'),
('FC Barcelona', 'barcelona'),
('FSV Mainz 05', 'fsvmainz'),
('Getafe CF', 'getafe'),
('Hamburger SV', 'hamburg'),
('Hannover 96', 'hannover'),
('Levante UD', 'levante'),
('Manchester United', 'manchester-united'),
('Queens Park Rangers', 'qpr'),
('RCD Espanyol', 'espanyol'),
('RCD Mallorca', 'realmallorca'),
('SC Freiburg', 'freiburg'),
('SC Freiburg', 'freiburg'),
('Schalke 04', 'schalke'),
('Sevilla FC', 'sevilla'),
('Shalke 04', 'shalke'),
('Swansea City', 'swansea'),
('Tottenham Hotspur', 'tottenham-hotspur'),
('Valencia CF', 'valencia'),
('VfB Stuttgart', 'stuttgart'),
('VfL Wolfsburg', 'wolfsburg'),
('West Bromwich Albion', 'westbrom'),
(u"Borussia M\u2019gladbach", 'borussiamoenchengladbach'),
(u'1. FC N\u00FCrnberg', 'nurnberg'),
(u'Atl\u00E9tico Madrid', 'atleticomadrid'),
(u'M\xe1laga CF', 'malaga'),
]

# How many minutes each reddit thread is updated for.
MATCH_LENGTH = 130
Expand All @@ -35,4 +39,4 @@
# to be posted.
PRE_KICK_OFF = 5

SUBREDDIT = 'chessporn'
SUBREDDIT = 'soccer'

0 comments on commit 303e788

Please sign in to comment.