Skip to content

Instantly share code, notes, and snippets.

@yvoderatskyi
Last active November 15, 2020 22:37
Show Gist options
  • Save yvoderatskyi/150cc1cbe5df4ac82647dabe916841c9 to your computer and use it in GitHub Desktop.
Save yvoderatskyi/150cc1cbe5df4ac82647dabe916841c9 to your computer and use it in GitHub Desktop.
A snippet of make file to import DeutscheBank transactions into hledger
# Requires https://csvkit.readthedocs.io/en/latest/ and https://hledger.org/
.PRECIOUS : csv/Transactions_%.csv
csv/Transactions_%.csv : raw/Transactions_%.csv
@echo "Converting encoding from cp1251 to utf-8"
in2csv $< -e cp1251 > $@
journal/%.journal : csv/Transactions_%.csv deutschebank.rules
@echo "Converting to journal"
hledger print --rules-file $(word 2,$^) --file $< > $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment