Skip to content

Commit

Permalink
examples: tarsnap csv rule fixes
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
simonmichael committed Feb 11, 2017
1 parent deeb10d commit 93cec2e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/csv-rules/tarsnap.csv.rules
@@ -1,4 +1,4 @@
# tarsnap.com's "Recent activity (all machines)", aka "Recent account activity (verbose)"
# hledger CSV conversion rules for tarsnap.com's "Recent activity (all machines)"
#
# RECTYPE,DATE,MACHINE,TYPE,QUANTITY,AMOUNT,BALANCE
# Balance,2016-12-28,,,,,28.396910846961952530
Expand All @@ -13,18 +13,19 @@ account1 assets:tarsnap

if ^Balance,
description %rectype: $%balance
account1 dummy
account2 dummy
amount $0
## TODO zero amount is always rendered without commodity symbol
# TODO zero amount is always rendered without commodity symbol

if ^Usage,
description %machine %type
account2 expenses:tarsnap:%machine:%type
amount -%quantity bytes @@ $%amount

# sample output:
# $ hledger -f .tarsnap.csv bal -B cur:\\$ -MAT expenses
# using conversion rules file .tarsnap.csv.rules
# $ hledger -f tarsnap.csv bal -B cur:\\$ -MAT expenses
# using conversion rules file tarsnap.csv.rules
# Balance changes in 2016/12/01-2017/02/28:
#
# || 2016/12 2017/01 2017/02 Total Average
Expand Down

0 comments on commit 93cec2e

Please sign in to comment.