code changes to iron blogger to move to mako.cc
authorBenjamin Mako Hill <mako@atdot.cc>
Wed, 9 Nov 2011 00:15:40 +0000 (19:15 -0500)
committerBenjamin Mako Hill <mako@atdot.cc>
Wed, 9 Nov 2011 00:15:40 +0000 (19:15 -0500)
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
scan-feeds.py
templates/config.ini
templates/email.txt
templates/iron-blogger.tmpl [deleted file]
update-participants.py
weekly-update.py

index 0e320bf5afb2d995a49f6429f73bc5a816cd4ed5..feaa16b8906dd6f50bce20bf99ae7493a196d205 100755 (executable)
--- a/render.py
+++ b/render.py
@@ -9,7 +9,7 @@ import os.path
 import subprocess
 from mako.template import Template
 
 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):
 HERE  = os.path.dirname(__file__)
 
 def get_balance(acct):
index 82438bb1b6c4fceaf6572eec9460cc98e0170157..b3fe213f2c0095f831e84522c244e17ce0de7f0f 100755 (executable)
@@ -15,7 +15,7 @@ try:
 except IOError:
     log = {}
 
 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)
 
 def parse_published(pub):
     return parse(pub).astimezone(tz.tzlocal()).replace(tzinfo=None)
index ffa19098579e0f3a5085b97612e998e66e0d7ba8..6c9fa7e7b515c2ec6cdf6b0a9dcce2632e8fe644 100644 (file)
@@ -7,14 +7,14 @@
 # owner_name: Your name
 # owner_email: Your e-mail address
 name = Planet Iron Blogger
 # 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: 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
 
 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
 # 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
 
 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':
 % for u in userlist:
 <%
 if u.username == 'adehnert':
index 16c6f27a4375739a787eb89a0e1c3534dade5e4a..59d64e8fb4954736cfc78bf860d0d799a9beb18b 100644 (file)
@@ -1,6 +1,6 @@
 ## -*- coding: utf-8 -*-
 Subject: IRON BLOGGER results for the week beginning ${week_start.strftime("%F")}
 ## -*- 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:
 
 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 (file)
index e0620af..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html 
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-  <head>
-    <title>Iron Blogger (for Beer)</title>
-      <style type="text/css">
-        #footnotes {
-        font-size: 80%;
-        }
-        #content {
-          width: 40em;
-          margin: auto;
-          border: 1px solid black;
-          padding: 1em;
-        }
-        #participants {
-          margin: auto;
-        }
-
-        h1,h2 {
-          text-align: center;
-          width: 100%;
-          margin-bottom: 1ex;
-        }
-
-        .subtitle {
-          font-size: 100%;
-        }
-      </style>
-
-  </head>
-  <body>
-    <div id='content'>
-      <h1>Iron Blogger</h1>
-      <h1 class='subtitle'>(With a beer money pool)</h1>
-
-      <h1>The Rules</h1>
-      <ol>
-        <li>
-          At least one blog post a week. Weeks will be defined as
-          starting and ending Monday morning at 0600.
-        </li>
-        <li>
-          You're welcome to post more than once in any given week, but
-          it doesn't count for the next week.
-        </li>
-        <li>
-          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.
-        </li>
-        <li>
-          Roughly once a month, we go out for beer<a
-          href="#f1"><sup>1</sup></a>. Beer is funded by the beer pool,
-          and we split the rest of the cost.
-        </li>
-        <li>
-          You're allowed to blog about this event as your first post.
-        </li>
-        <li>
-          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.
-        </li>
-        <li>
-          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.
-        </li>
-        <li>
-          Any topic or length of blog post is acceptable. If it's
-          obviously filler, we may laugh at you, but it still
-          counts.
-        </li>
-        <li>
-          These rules are open for discussion, but I reserve the right
-          to make an arbitrary decision and declare it official if
-          anyone starts wanking.
-        </li>
-        <li>
-          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.
-        </li>
-        <li>
-          There is no set end date. The event may be ended by group
-          agreement.
-        </li>
-        <li>
-          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 (<tt>nelhage@mit.edu</tt>) to
-          join.
-        </li>
-      </ol>
-
-      <h1>Participants</h1>
-
-      <table id='participants'>
-        <tr>
-          <th>Who</th>
-          <th style='width: 10em'>Blog link</th>
-          <th>Start Week</th>
-        </tr>
-% for u in userlist:
-        <tr>
-          <td><tt> ${u.username} </tt></td>
-          <td>
-           % if u.links:
-            % for a in u.links:
-           <a href="${a[1]}">${a[0]}</a>
-            % endfor
-           % else:
-             Undecided
-           % endif
-          </td>
-          <td> ${u.start} </td>
-        </tr>
-% endfor
-      </table>
-
-      <div id="footnotes">
-        <h3>Footnotes</h3>
-        <ol>
-          <li id="f1">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.</li>
-        </ol>
-      </div>
-    </div>
-  </body>
-</html>
index 21980a1d6f12a6ba9492e6c1fa501ce823d85c89..fa65ccc82e342f223e4af3040426c4e6cee6e070 100755 (executable)
@@ -7,10 +7,10 @@ import xmlrpclib
 import subprocess
 
 
 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
 BLOG_ID         = 1
-PAGE_ID         = 16
+PAGE_ID         = 12
 
 try:
     subprocess.call(['stty', '-echo'])
 
 try:
     subprocess.call(['stty', '-echo'])
index 4aa749c6156cf0d2cfae51df841b337028bb54d1..ad6ef1a43095fce7926a0ef25d8562020cd9d90c 100755 (executable)
@@ -7,8 +7,8 @@ import subprocess
 import datetime
 import yaml
 
 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
 BLOG_ID         = 1
 
 dry_run = False

Benjamin Mako Hill || Want to submit a patch?