Comment on
Help with parsing this dateformat using hledger
Reply in thread
Thanks for pointing that out, it was one of the problems, the solution was using:
date-format %Y-%m-%d %H:%M:%S
Next problem was I forgot to add skip 1 at the top.
Comment on
Help with parsing this dateformat using hledger
Reply in thread
Thanks for pointing that out, it was one of the problems, the solution was using:
date-format %Y-%m-%d %H:%M:%S
Next problem was I forgot to add skip 1 at the top.
Comment on
Any way to see net instead of gross in Revenue in hledger?
Reply in thread
Thank you so much! It works exactly like I wanted!
Comment on
See expenses in date range monthly for certain day range only
Kind of got it as I started thinking about it after posting... Would be better as a oneliner set to an alias so one can add flags on the fly, but this works:
#!/usr/bin/env bash
# Where to save temporary journal
PROGRESS_JOURNAL_PATH="/tmp/progress.journal"
# Current month as number
MONTH=$(date +%m)
# Need to increment the month with one for loop to work
((MONTH++))
# Clean out the temp journal in case it already exists
echo -e "; Temporary progress journal\n" > "$PROGRESS_JOURNAL_PATH"
for ((COUNTER = 1 ; COUNTER < $MONTH ; COUNTER++)); do
# Append each months transactions until current month within the same date range as today
hledger print -b "$(date +%Y)-$COUNTER-01" -e "$(date +%Y)-$COUNTER-$(date +%d)" >> "$PROGRESS_JOURNAL_PATH"
done
# Print out the command that should run to output
echo "$ hledger -f $PROGRESS_JOURNAL_PATH is -t -M -A"
# Get the result
hledger -f "$PROGRESS_JOURNAL_PATH" is -t -M -A -S