projects
/
iron-blogger
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare for floating-point values in ledger
[iron-blogger]
/
render.py
diff --git
a/render.py
b/render.py
index 0a7bf46f488d68095a370ac722467aa8631d2c82..0fa0489434bcea6f0222c511f23adaea04f7c25a 100755
(executable)
--- a/
render.py
+++ b/
render.py
@@
-71,7
+71,7
@@
def render_template(path, week=None):
'-n', 'balance', acct],
stdout=subprocess.PIPE)
(out, _) = p.communicate()
'-n', 'balance', acct],
stdout=subprocess.PIPE)
(out, _) = p.communicate()
- return
in
t(out.split()[0][1:])
+ return
floa
t(out.split()[0][1:])
p = subprocess.Popen(['ledger', '-f', os.path.join(HERE,'ledger'),
'-n', 'balance', 'Pool:Owed:'],
p = subprocess.Popen(['ledger', '-f', os.path.join(HERE,'ledger'),
'-n', 'balance', 'Pool:Owed:'],
@@
-82,7
+82,7
@@
def render_template(path, week=None):
if not line: continue
(val, acct) = line.split()
user = acct[len("Pool:Owed:"):]
if not line: continue
(val, acct) = line.split()
user = acct[len("Pool:Owed:"):]
- val =
in
t(val[len("$"):])
+ val =
floa
t(val[len("$"):])
debts.append((user, val))
return Template(filename=path, output_encoding='utf-8').render(
debts.append((user, val))
return Template(filename=path, output_encoding='utf-8').render(
Benjamin Mako Hill
||
Want to submit a patch?