]> projects.mako.cc - iron-blogger/blobdiff - render.py
update render.py to work with new options in ledger >=3
[iron-blogger] / render.py
index 0e320bf5afb2d995a49f6429f73bc5a816cd4ed5..6e4e80ce53e708b007b00f656a9526ebda1333d2 100755 (executable)
--- 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):
@@ -20,8 +20,10 @@ def get_balance(acct):
     return float(out.split()[0][1:])
 
 def get_debts():
-    p = subprocess.Popen(['ledger', '-f', os.path.join(HERE, 'ledger'),
-                          '-n', 'balance', 'Pool:Owed:'],
+    p = subprocess.Popen(['ledger', '-f',
+                           os.path.join(HERE, 'ledger'),
+                           '--no-color', '--flat',
+                           '--no-total', 'balance', 'Pool:Owed:'],
                          stdout=subprocess.PIPE)
     (out, _) = p.communicate()
     debts = []

Benjamin Mako Hill || Want to submit a patch?