From 30fd9f8032af69d94001dfbddcdb5b392e9e4bcd Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Tue, 8 Nov 2011 19:15:40 -0500 Subject: [PATCH] code changes to iron blogger to move to mako.cc I'm starting Iron Blogger up again, and I need to make a bunch of changes which essentially hardcoded the MIT address or details about that instance of Iron Blogger. Iron Blogger is dead! Love Live Iron Blogger! --- render.py | 2 +- scan-feeds.py | 2 +- templates/config.ini | 11 ++- templates/email.txt | 2 +- templates/iron-blogger.tmpl | 136 ------------------------------------ update-participants.py | 6 +- weekly-update.py | 4 +- 7 files changed, 13 insertions(+), 150 deletions(-) delete mode 100644 templates/iron-blogger.tmpl diff --git a/render.py b/render.py index 0e320bf..feaa16b 100755 --- a/render.py +++ b/render.py @@ -9,7 +9,7 @@ import os.path import subprocess from mako.template import Template -START = datetime.datetime(2009, 12, 21, 6) +START = datetime.datetime(2011, 10, 24, 6) HERE = os.path.dirname(__file__) def get_balance(acct): diff --git a/scan-feeds.py b/scan-feeds.py index 82438bb..b3fe213 100755 --- a/scan-feeds.py +++ b/scan-feeds.py @@ -15,7 +15,7 @@ try: except IOError: log = {} -START = datetime.datetime(2009, 12, 21, 6) +START = datetime.datetime(2011, 10, 24, 6) def parse_published(pub): return parse(pub).astimezone(tz.tzlocal()).replace(tzinfo=None) diff --git a/templates/config.ini b/templates/config.ini index ffa1909..6c9fa7e 100644 --- a/templates/config.ini +++ b/templates/config.ini @@ -7,14 +7,14 @@ # owner_name: Your name # owner_email: Your e-mail address name = Planet Iron Blogger -link = http://iron-blogger.mit.edu/planet/ -owner_name = Nelson Elhage -owner_email = nelhage@mit.edu +link = http://iron-blogger.mako.cc/planet/ +owner_name = Benjamin Mako Hill +owner_email = mako@atdot.cc # cache_directory: Where cached feeds are stored # new_feed_items: Number of items to take from new feeds # log_level: One of DEBUG, INFO, WARNING, ERROR or CRITICAL -cache_directory = /mit/nelhage/web_scripts_tmp/planet +cache_directory = /home/mako/websites/iron-blogger/planet-cache new_feed_items = 2 log_level = DEBUG @@ -33,14 +33,13 @@ template_files = iron-blogger/index.html.tmpl iron-blogger/atom.xml.tmpl iron-bl # locale: locale to use for (e.g.) strings in dates, default is taken from your # system. You can specify more locales separated by ':', planet will # use the first available one -output_dir = /mit/nelhage/web_scripts/iron-blogger/planet/ +output_dir = /home/mako/websites/iron-blogger/planet-output items_per_page = 15 days_per_page = 0 date_format = %B %d, %Y %I:%M %p new_date_format = %B %d, %Y encoding = utf-8 - % for u in userlist: <% if u.username == 'adehnert': diff --git a/templates/email.txt b/templates/email.txt index 16c6f27..59d64e8 100644 --- a/templates/email.txt +++ b/templates/email.txt @@ -1,6 +1,6 @@ ## -*- coding: utf-8 -*- Subject: IRON BLOGGER results for the week beginning ${week_start.strftime("%F")} -To: iron-blogger@mit.edu +To: iron-blogger@mako.cc SLACKERS: ${", ".join(sorted([u.username for u in lame]))} % if punt: diff --git a/templates/iron-blogger.tmpl b/templates/iron-blogger.tmpl deleted file mode 100644 index e0620af..0000000 --- a/templates/iron-blogger.tmpl +++ /dev/null @@ -1,136 +0,0 @@ - - - - - Iron Blogger (for Beer) - - - - -
-

Iron Blogger

-

(With a beer money pool)

- -

The Rules

-
    -
  1. - At least one blog post a week. Weeks will be defined as - starting and ending Monday morning at 0600. -
  2. -
  3. - You're welcome to post more than once in any given week, but - it doesn't count for the next week. -
  4. -
  5. - If you miss a post, you owe the beer pool $5. I can keep - track of this, or we can throw together a google docs - spreadsheet or something. -
  6. -
  7. - Roughly once a month, we go out for beer1. Beer is funded by the beer pool, - and we split the rest of the cost. -
  8. -
  9. - You're allowed to blog about this event as your first post. -
  10. -
  11. - Week one started today (Dec 21), so you have until the start - of the 28th to make your first post. Since you get a freebie, - this should be easy. -
  12. -
  13. - However, since you may already have plans for the week of - Christmas, you may take a free skip for the first week by - letting me know soon after you tell me you want to join. -
  14. -
  15. - Any topic or length of blog post is acceptable. If it's - obviously filler, we may laugh at you, but it still - counts. -
  16. -
  17. - These rules are open for discussion, but I reserve the right - to make an arbitrary decision and declare it official if - anyone starts wanking. -
  18. -
  19. - You're allowed to punt at any time by notifying me before - the end of the week in which you are punting. You can't - retroactively punt. -
  20. -
  21. - There is no set end date. The event may be ended by group - agreement. -
  22. -
  23. - Anyone may join up until the end of the first full week - (0600 on Monday, January 4). After that point the list is - closed, although occasional exceptions may be - possible. Email Nelson Elhage (nelhage@mit.edu) to - join. -
  24. -
- -

Participants

- - - - - - - -% for u in userlist: - - - - - -% endfor -
WhoBlog linkStart Week
${u.username} - % if u.links: - % for a in u.links: - ${a[0]} - % endfor - % else: - Undecided - % endif - ${u.start}
- -
-

Footnotes

-
    -
  1. Some of you are underage, and some of you don't - drink beer, so we'll figure out some way to accommodate as - appropriate. I'm open to suggestions. Hard apple cider and the - like count as "beer" for the purpose of this excercise.
  2. -
-
-
- - diff --git a/update-participants.py b/update-participants.py index 21980a1..fa65ccc 100755 --- a/update-participants.py +++ b/update-participants.py @@ -7,10 +7,10 @@ import xmlrpclib import subprocess -XMLRPC_ENDPOINT = 'http://iron-blogger.mit.edu/xmlrpc.php' -USER = 'nelhage' +XMLRPC_ENDPOINT = 'http://iron-blogger.mako.cc/xmlrpc.php' +USER = 'mako' BLOG_ID = 1 -PAGE_ID = 16 +PAGE_ID = 12 try: subprocess.call(['stty', '-echo']) diff --git a/weekly-update.py b/weekly-update.py index 4aa749c..ad6ef1a 100755 --- a/weekly-update.py +++ b/weekly-update.py @@ -7,8 +7,8 @@ import subprocess import datetime import yaml -XMLRPC_ENDPOINT = 'http://iron-blogger.mit.edu/xmlrpc.php' -USER = 'nelhage' +XMLRPC_ENDPOINT = 'http://iron-blogger.mako.cc/xmlrpc.php' +USER = 'mako' BLOG_ID = 1 dry_run = False -- 2.39.5