From fc6282898b13150beb8e848ba404ed384bbe641d Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 11 May 2023 14:16:12 -1000 Subject: [PATCH] ;examples: csv: Makefile cleanup --- examples/csv/Makefile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/examples/csv/Makefile b/examples/csv/Makefile index 9e2f23d75..8c5a17797 100644 --- a/examples/csv/Makefile +++ b/examples/csv/Makefile @@ -17,7 +17,7 @@ YEAR:=$(shell date +%Y) JOURNAL=$(YEAR).journal -HLEDGER=hledger + RG=rg -IN --sort=path help: # list make targets @@ -51,13 +51,14 @@ CSVS=\ # stripe.csv \ # stripeexpress.csv \ -# 2. How to make these CSV files (what download file to copy them from). -wf-checking.csv: $(DOWNLOADDIR)/Checking1.csv ; mv $< $@ -wf-savings.csv: $(DOWNLOADDIR)/Savings2.csv ; mv $< $@ -paypal.csv: $(DOWNLOADDIR)/Download.csv ; mv $< $@ -vanguard.csv: $(DOWNLOADDIR)/ofxdownload.csv ; mv $< $@ -#stripe.csv: $(DOWNLOADDIR)/Itemized_balance_change_from_activity_USD_*.csv ; mv $< $@ -#stripeexpress.csv: $(DOWNLOADDIR)/StripeExpressActivity_*.csv ; mv $< $@ +# 2. How to make these CSV files / where to move them from. +wf-checking.csv: $(DOWNLOADDIR)/Checking1.csv; mv $< $@ +wf-savings.csv: $(DOWNLOADDIR)/Savings2.csv ; mv $< $@ +paypal.csv: $(DOWNLOADDIR)/Download.csv ; mv $< $@ +# paypal.csv: PHONY; paypaljson | paypaljson2csv > $@ +vanguard.csv: $(DOWNLOADDIR)/ofxdownload.csv; mv $< $@ +#stripe.csv: $(DOWNLOADDIR)/Itemized_balance_change_from_activity_USD_*.csv; mv $< $@ +#stripeexpress.csv: $(DOWNLOADDIR)/StripeExpressActivity_*.csv; mv $< $@ # 3. Marking them as intermediate files (https://www.gnu.org/software/make/manual/html_node/Chained-Rules.html). .INTERMEDIATE: \ @@ -70,9 +71,6 @@ vanguard.csv: $(DOWNLOADDIR)/ofxdownload.csv csv: $(CSVS) # move any downloaded CSVs to the standard filenames above -# paypal.csv: PHONY # download paypal CSV from API -# paypaljson | paypaljson2csv > $@ - ############################################################################### # ** IMPORT @@ -123,4 +121,4 @@ prices-dry: PHONY # download and show today's prices, without saving # ** REPORTS bs: # simplified balance sheet - $(HLEDGER) bs -2 -V --infer-market-prices --layout=bare + hledger bs -2 -V --infer-market-prices --layout=bare