From d3714630b22f427c2019fcad282b83ecb3401be0 Mon Sep 17 00:00:00 2001 From: olli Date: Thu, 5 Sep 2024 18:01:31 +0200 Subject: [PATCH] fixed and nicer output, added charts --- dabo/functions/webpage_transactions.sh | 32 +++----------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/dabo/functions/webpage_transactions.sh b/dabo/functions/webpage_transactions.sh index f051fcd..89de507 100644 --- a/dabo/functions/webpage_transactions.sh +++ b/dabo/functions/webpage_transactions.sh @@ -37,7 +37,7 @@ function webpage_transactions { local f_tax_year cat ALL_TRANSACTIONS_OVERVIEW.csv | cut -d- -f1 | sort -u | while read f_tax_year do - echo "========== Tax year $f_tax_year (German Tax Law) ==========" + #echo "========== Tax year $f_tax_year (German Tax Law) ==========" local f_exchange_tax_type cat ALL_TRANSACTIONS_OVERVIEW.csv | grep "^$f_tax_year-" | cut -d, -f 2,13 | sort -u | egrep -v ',$' | grep -v "Note: " | while read f_exchange_tax_type do @@ -45,9 +45,9 @@ function webpage_transactions { local f_tax_type=$(echo $f_exchange_tax_type | cut -d, -f2) local f_tax=$(cat ALL_TRANSACTIONS_OVERVIEW.csv | grep "^$f_tax_year-" | cut -d, -f 2,13,14 | egrep -v ',,0$' | grep "$f_exchange_tax_type" | cut -d, -f3 | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM) }") - echo "$f_exchange_tax_type: $f_tax" + #echo "$f_exchange_tax_type: $f_tax" - echo "$f_tax_type: $f_tax EUR
" >>${g_tmp}/tax_summary_$f_exchange-$f_tax_year + #echo "$f_tax_type: $f_tax EUR
" >>${g_tmp}/tax_summary_$f_exchange-$f_tax_year echo " @@ -88,31 +88,5 @@ $(cat ${g_tmp}/tax_summary_$f_exchange-$f_tax_year) echo "" done - ## Overview over Overviews - echo " - - - - - - - Trading Overview - - -

Transaction Overviews

" >../TRANSACTIONS_OVERVIEWS.html - - - local f_html f_name - ls ../TRANSACTIONS_OVERVIEW-* | while read f_html - do - f_html=$(basename $f_html) - f_name=$(echo $f_html | cut -d- -f2,3 | cut -d. -f1) - echo "$f_name
" >>../TRANSACTIONS_OVERVIEWS.html - done - echo "$(cat ALL_TRANSACTIONS_OVERVIEW_WARN.csv | cut -d, -f1,2,20)
" >>../TRANSACTIONS_OVERVIEWS.html - - echo "" >>../TRANSACTIONS_OVERVIEWS.html - - }