diff --git a/container/src/hledger-flow/accounts/ally/ally-shared.bash b/container/src/hledger-flow/accounts/ally/ally-shared.bash index 4270d68..6b60d85 100755 --- a/container/src/hledger-flow/accounts/ally/ally-shared.bash +++ b/container/src/hledger-flow/accounts/ally/ally-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,6 +47,7 @@ function parse() sub(/^ /, "", $5) # may have an empty space in front of line gsub(/, /, " - ") # may have (multiple) commas followed by space gsub(/"/, "", $5) # may have (multiple) quotes + sub(/%/, "%%", $5) # remove potential interpretation printf $1 OFS # Date printf $2 OFS # Time diff --git a/container/src/hledger-flow/accounts/btcpayserver/btcpayserver-shared.bash b/container/src/hledger-flow/accounts/btcpayserver/btcpayserver-shared.bash index a4ebacd..973bcf0 100755 --- a/container/src/hledger-flow/accounts/btcpayserver/btcpayserver-shared.bash +++ b/container/src/hledger-flow/accounts/btcpayserver/btcpayserver-shared.bash @@ -127,6 +127,7 @@ function btcpayserver::legacy() printf $22 OFS # InvoiceItemCode # TODO: if description contains comma(s)? + sub(/%/, "%%", $23) printf $23 OFS # InvoiceItemDesc printf $24 OFS # InvoiceFullStatus diff --git a/container/src/hledger-flow/accounts/capital-one/capital-one-shared.bash b/container/src/hledger-flow/accounts/capital-one/capital-one-shared.bash index 937af30..0807d04 100755 --- a/container/src/hledger-flow/accounts/capital-one/capital-one-shared.bash +++ b/container/src/hledger-flow/accounts/capital-one/capital-one-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -46,7 +46,10 @@ function parse_credit() printf $1 OFS # Transaction Date printf $2 OFS # Posted Date printf $3 OFS # Card No. + + sub(/%/, "%%", $4) printf $4 OFS # Description + printf $5 OFS # Category # Debit = OUT, Credit = IN @@ -84,7 +87,10 @@ function parse_bank() sub(/^-/, "", $5) printf $1 OFS # Account Number + + sub(/%/, "%%", $2) printf $2 OFS # Transaction Description + printf $3 OFS # Transaction Date printf $4 OFS # Transaction Type printf $5 OFS # Transaction Amount diff --git a/container/src/hledger-flow/accounts/chase/chase-shared.bash b/container/src/hledger-flow/accounts/chase/chase-shared.bash index 89e0bf3..2e57059 100755 --- a/container/src/hledger-flow/accounts/chase/chase-shared.bash +++ b/container/src/hledger-flow/accounts/chase/chase-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -45,7 +45,10 @@ function parse_credit() printf $1 OFS # Transaction Date printf $2 OFS # Post Date + + sub(/%/, "%%", $3) printf $3 OFS # Description + printf $4 OFS # Category printf $5 OFS # Type @@ -75,6 +78,8 @@ function parse_bank() printf $1 OFS # Details (CREDIT/DEBIT/DSLIP/etc.) printf $2 OFS # Posting Date + + sub(/%/, "%%", $3) printf $3 OFS # Description # Amount diff --git a/container/src/hledger-flow/accounts/discover/discover-shared.bash b/container/src/hledger-flow/accounts/discover/discover-shared.bash index 05af820..fa886f6 100755 --- a/container/src/hledger-flow/accounts/discover/discover-shared.bash +++ b/container/src/hledger-flow/accounts/discover/discover-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,6 +47,8 @@ function parse_credit() printf $1 OFS # Trans. Date printf $2 OFS # Post Date + + sub(/%/, "%%", $3) printf $3 OFS # Description # Flip the amount signs for proper liabilities accounting @@ -74,7 +76,10 @@ function parse_bank() next printf $1 OFS # Transaction Date + + sub(/%/, "%%", $2) printf $2 OFS # Transaction Description + printf $3 OFS # Transaction Type sub(/\$/,"",$4); diff --git a/container/src/hledger-flow/accounts/electrum/electrum-shared.bash b/container/src/hledger-flow/accounts/electrum/electrum-shared.bash index 584506f..48e8453 100755 --- a/container/src/hledger-flow/accounts/electrum/electrum-shared.bash +++ b/container/src/hledger-flow/accounts/electrum/electrum-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,10 @@ function parse() next printf $1 OFS # transaction_hash + + sub(/%/, "%%", $2) printf $2 OFS # label + printf $3 OFS # confirmations # value (without fee) diff --git a/container/src/hledger-flow/accounts/etrade/etrade-shared.bash b/container/src/hledger-flow/accounts/etrade/etrade-shared.bash index 6a279f8..4bbb438 100755 --- a/container/src/hledger-flow/accounts/etrade/etrade-shared.bash +++ b/container/src/hledger-flow/accounts/etrade/etrade-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -66,6 +66,8 @@ function parse() printf $7 OFS # Price printf $8 OFS # Comission + + sub(/%/, "%%", $9) printf $9 OFS # Description printf direction OFS diff --git a/container/src/hledger-flow/accounts/paypal-business/paypal-business-shared.bash b/container/src/hledger-flow/accounts/paypal-business/paypal-business-shared.bash index 8810a7f..5c0fff7 100755 --- a/container/src/hledger-flow/accounts/paypal-business/paypal-business-shared.bash +++ b/container/src/hledger-flow/accounts/paypal-business/paypal-business-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -55,7 +55,10 @@ function parse() if ($10 == "") {$10 = "0"} printf $1 " " $2 OFS # Date/Time + + sub(/%/, "%%", $4) printf $4 OFS # Name (description) + printf $5 OFS # Type printf $6 OFS # Status printf $7 OFS # Currency @@ -68,7 +71,10 @@ function parse() printf $12 OFS # To Email Address printf $13 OFS # Transaction ID printf $(NF-4) OFS # Contact Phone Number + + sub(/%/, "%%", $(NF-2)) printf $(NF-2) OFS # Note + printf $(NF) OFS # Balance Impact # Direction diff --git a/container/src/hledger-flow/accounts/paypal/paypal-shared.bash b/container/src/hledger-flow/accounts/paypal/paypal-shared.bash index fd1be93..19ed2bc 100755 --- a/container/src/hledger-flow/accounts/paypal/paypal-shared.bash +++ b/container/src/hledger-flow/accounts/paypal/paypal-shared.bash @@ -70,7 +70,10 @@ function parse_report() # Print printf timestamp OFS # timestamp + + sub(/%/, "%%", $3) printf $3 OFS # description (Name) + printf $4 OFS # type printf $5 OFS # status printf $6 OFS # currency @@ -91,6 +94,8 @@ function parse_report() printf $12 OFS # balance printf $13 OFS # txid (Transaction ID) + + sub(/%/, "%%", $14) printf $14 OFS # title (Item Title) printf direction OFS diff --git a/container/src/hledger-flow/accounts/trezor/trezor-shared.bash b/container/src/hledger-flow/accounts/trezor/trezor-shared.bash index 0b9a134..472aa28 100755 --- a/container/src/hledger-flow/accounts/trezor/trezor-shared.bash +++ b/container/src/hledger-flow/accounts/trezor/trezor-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -72,7 +72,10 @@ function parse() printf $6 OFS # Fee printf $7 OFS # Fee unit printf $8 OFS # Address + + sub(/%/, "%%", $9) printf $9 OFS # Label + printf("%.8f", $10); printf OFS # Amount # TODO: more than 8 places for Ethereum, etc.? printf $11 OFS # Amount unit printf $12 OFS # Fiat (USD) diff --git a/container/src/hledger-flow/accounts/vultr/vultr-shared.bash b/container/src/hledger-flow/accounts/vultr/vultr-shared.bash index 8d08d23..389bf18 100755 --- a/container/src/hledger-flow/accounts/vultr/vultr-shared.bash +++ b/container/src/hledger-flow/accounts/vultr/vultr-shared.bash @@ -2,7 +2,7 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2024 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2024-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -59,6 +59,8 @@ function parse() # Skip $1 # start date printf $2 OFS # end date (date) + + sub(/%/, "%%", $3) printf $3 OFS # description # Skip $4