Do the ledger and email in weekly-update.

This commit is contained in:
Nelson Elhage 2010-03-01 19:50:54 -05:00
parent 432469ed4b
commit ab393a07f5
1 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,9 @@ finally:
x = xmlrpclib.ServerProxy(XMLRPC_ENDPOINT)
with open('ledger', 'a') as f:
f.write(render.render_template('templates/ledger', sys.argv[1]))
text = render.render_template('templates/week.tmpl', sys.argv[1])
lines = text.split("\n")
@ -28,3 +31,7 @@ page = dict(title = title,
description = body)
x.metaWeblog.newPost(BLOG_ID, USER, passwd, page, True)
p = subprocess.Popen(['mutt', '-H', '/dev/stdin'],
stdin=subprocess.PIPE)
p.communicate(render.render_template('templates/email.txt', sys.argv[1]))