hledger/tests/csv.test

752 lines
14 KiB
Plaintext
Raw Normal View History

2012-03-26 02:12:52 +04:00
# 1. read CSV to hledger journal format
<
10/2009/09,Flubber Co,50
RULES
fields date, description, amount
date-format %d/%Y/%m
currency $
account1 assets:myacct
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50
income:unknown $-50
2019-06-07 00:37:36 +03:00
>=0
2012-01-30 21:18:32 +04:00
2012-03-26 02:12:52 +04:00
# 2. reading CSV with in-field and out-field
2019-06-07 00:37:36 +03:00
<
csv: merge lucamolteni's cassava/custom separators (squashed) (#829) commit 5ba464de761b298e50d57a8b7d14bc28adb30d5d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:54:12 2018 +0200 Fix CI 2 commit f060ae9449f4b61a915b0ed4629fc1ba9b66fb4a Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:30:08 2018 +0200 Fix CI build commit af0719a33b9b72ad244ae80198d881a1f7145e9d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:19:01 2018 +0200 Fix rebase commit 1a24ddfa54dfb4ff1326e1a51005ffa82d3dc3c8 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:25:24 2018 +0200 Fixed some GHC warnings commit 1ac43398a359b5925ef71f53347698f1c6c510ef Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:14:49 2018 +0200 Fix .cabal commit 422456b925d8aa4ab3e869f51e98c2b1c3dcde0a Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:56:20 2018 +0200 Removed to-do list commit 1118b762e4fd15c4fe7ba48ba86676706ea3a5a5 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:53:28 2018 +0200 Better test commit 1146ed0941655668bf7684f18aa15c5f4b9b20c2 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 15:32:28 2018 +0200 Fix parsing commit 4fc2374b2b81802990da30c96756aab54d77399c Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 22:11:11 2018 +0200 Parsing of separator commit f7a61737f1ad4460ba20ca9b2e86eb21468abb33 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:29:23 2018 +0200 Almost separator in options commit ac8841cf3b9c80914bc3271ad9b9ff4ae9ba48a7 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:16:59 2018 +0200 Separator in parseCSV commit 92a8b9f6ba77ea4237f769641e03029ac88542ea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 13:30:41 2018 +0200 separator option commit ec417a81ae625647cf35e61776cdf02bdb2c6aea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 10:45:26 2018 +0200 Removed one qualified import commit 8b2f386c2f780adcd34cff3de7edceacc1d325a7 Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 14:01:12 2018 +0200 Removed string conversions commit a14d0e099e28a286bb81770cfc9cb8f5c7e5cf1f Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 10:23:20 2018 +0200 custom delimiter in cassava commit 694d48e2bc1ada0037b90367c017f3082f68ed45 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:51:54 2018 +0200 Use Text.getContents - remove UTF-8 compatibility library commit a7ada2cc60033ebdd796ca34cc2ec69a4f387843 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:49:34 2018 +0200 todo list commit 58ec47d3987909f6bace50e3e647e30dadd5bf03 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:45:22 2018 +0200 CSV test now has unicode characters commit b7851e94c3f1683b63ec7250a12bcde3b7bed691 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 16:59:39 2018 +0200 Use decode from Text commit 79f59fd28ccaca08fcd718fcd8d00b1c1d65d7e1 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 13:28:57 2018 +0200 Use Text and Lazy Bytestring commit 470c9bcb8dc00669beb4ef0303a1e7d9f7aecc89 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:30:22 2018 +0200 Use megaparsec error commit f978848ba249ef4f67b855bea5d4e549290c205c Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:22:07 2018 +0200 Renamed qualify and remove Parsec commit 152587fde204c43a55798d212e43f37cd3038c2e Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:12:36 2018 +0200 Use cassava mega parsec commit cf281577a3d3a071196484a6fc8485f2ea1f7d67 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 14:01:47 2018 +0200 Removed Data.Vector commit 1272e8e758369d8cc5778029a705b277355a5029 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:16:18 2018 +0200 Removed Parsec ParseError commit ae07f043135a19307fd65b281ade37a74c76acb2 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:06:14 2018 +0200 Type sinonim for ParsecError commit 8e15b253c11bd1c0c35a7641aeb18aa54e0ba9b0 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:16:08 2018 +0200 Replaced with typeclasses commit 1ed46f9c175603611325f3d377004e4b85f29377 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:01:33 2018 +0200 Replaced Text/CSV with Cassava commit 362f4111b5854145703174b976fc7acbd71b8783 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 10:34:37 2018 +0200 Use cassava parsin instead of Text/CSV commit 83e678e371618687cf7c15a4e2cfa67f570b6b64 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 08:22:51 2018 +0200 Text CSV error messages commit f922df71d274beeacab9fb2530b16c97f005cc08 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:45:20 2018 +0200 Better types commit edd130781c84790a53bff2283e6041eb8232e7cf Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:34:59 2018 +0200 Conversion to Text CSV type commit 0799383214483018ad2d977a3c8022414959c2b2 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 16:06:21 2018 +0200 First function with cassava commit e92aeb151ff527b383ff3d0ced7764e81b71af82 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:47:34 2018 +0200 Added cassava as dependency commit 5ea005c558a3939af7e5f0cd735a9b4da931228e Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:18:47 2018 +0200 Better .gitignore for multi idea modules
2018-09-07 20:12:13 +03:00
10/2009/09,Flubber Co🎅,50,
11/2009/09,Flubber Co🎅,,50
RULES
account1 Assets:MyAccount
date %1
date-format %d/%Y/%m
description %2
amount-in %3
amount-out %4
currency $
$ ./csvtest.sh
2009-09-10 Flubber Co🎅
Assets:MyAccount $50
income:unknown $-50
2012-03-26 02:12:52 +04:00
2009-09-11 Flubber Co🎅
Assets:MyAccount $-50
expenses:unknown $50
2012-03-26 02:12:52 +04:00
2019-06-07 00:37:36 +03:00
>=0
csv: merge lucamolteni's cassava/custom separators (squashed) (#829) commit 5ba464de761b298e50d57a8b7d14bc28adb30d5d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:54:12 2018 +0200 Fix CI 2 commit f060ae9449f4b61a915b0ed4629fc1ba9b66fb4a Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:30:08 2018 +0200 Fix CI build commit af0719a33b9b72ad244ae80198d881a1f7145e9d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:19:01 2018 +0200 Fix rebase commit 1a24ddfa54dfb4ff1326e1a51005ffa82d3dc3c8 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:25:24 2018 +0200 Fixed some GHC warnings commit 1ac43398a359b5925ef71f53347698f1c6c510ef Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:14:49 2018 +0200 Fix .cabal commit 422456b925d8aa4ab3e869f51e98c2b1c3dcde0a Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:56:20 2018 +0200 Removed to-do list commit 1118b762e4fd15c4fe7ba48ba86676706ea3a5a5 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:53:28 2018 +0200 Better test commit 1146ed0941655668bf7684f18aa15c5f4b9b20c2 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 15:32:28 2018 +0200 Fix parsing commit 4fc2374b2b81802990da30c96756aab54d77399c Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 22:11:11 2018 +0200 Parsing of separator commit f7a61737f1ad4460ba20ca9b2e86eb21468abb33 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:29:23 2018 +0200 Almost separator in options commit ac8841cf3b9c80914bc3271ad9b9ff4ae9ba48a7 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:16:59 2018 +0200 Separator in parseCSV commit 92a8b9f6ba77ea4237f769641e03029ac88542ea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 13:30:41 2018 +0200 separator option commit ec417a81ae625647cf35e61776cdf02bdb2c6aea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 10:45:26 2018 +0200 Removed one qualified import commit 8b2f386c2f780adcd34cff3de7edceacc1d325a7 Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 14:01:12 2018 +0200 Removed string conversions commit a14d0e099e28a286bb81770cfc9cb8f5c7e5cf1f Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 10:23:20 2018 +0200 custom delimiter in cassava commit 694d48e2bc1ada0037b90367c017f3082f68ed45 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:51:54 2018 +0200 Use Text.getContents - remove UTF-8 compatibility library commit a7ada2cc60033ebdd796ca34cc2ec69a4f387843 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:49:34 2018 +0200 todo list commit 58ec47d3987909f6bace50e3e647e30dadd5bf03 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:45:22 2018 +0200 CSV test now has unicode characters commit b7851e94c3f1683b63ec7250a12bcde3b7bed691 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 16:59:39 2018 +0200 Use decode from Text commit 79f59fd28ccaca08fcd718fcd8d00b1c1d65d7e1 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 13:28:57 2018 +0200 Use Text and Lazy Bytestring commit 470c9bcb8dc00669beb4ef0303a1e7d9f7aecc89 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:30:22 2018 +0200 Use megaparsec error commit f978848ba249ef4f67b855bea5d4e549290c205c Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:22:07 2018 +0200 Renamed qualify and remove Parsec commit 152587fde204c43a55798d212e43f37cd3038c2e Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:12:36 2018 +0200 Use cassava mega parsec commit cf281577a3d3a071196484a6fc8485f2ea1f7d67 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 14:01:47 2018 +0200 Removed Data.Vector commit 1272e8e758369d8cc5778029a705b277355a5029 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:16:18 2018 +0200 Removed Parsec ParseError commit ae07f043135a19307fd65b281ade37a74c76acb2 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:06:14 2018 +0200 Type sinonim for ParsecError commit 8e15b253c11bd1c0c35a7641aeb18aa54e0ba9b0 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:16:08 2018 +0200 Replaced with typeclasses commit 1ed46f9c175603611325f3d377004e4b85f29377 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:01:33 2018 +0200 Replaced Text/CSV with Cassava commit 362f4111b5854145703174b976fc7acbd71b8783 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 10:34:37 2018 +0200 Use cassava parsin instead of Text/CSV commit 83e678e371618687cf7c15a4e2cfa67f570b6b64 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 08:22:51 2018 +0200 Text CSV error messages commit f922df71d274beeacab9fb2530b16c97f005cc08 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:45:20 2018 +0200 Better types commit edd130781c84790a53bff2283e6041eb8232e7cf Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:34:59 2018 +0200 Conversion to Text CSV type commit 0799383214483018ad2d977a3c8022414959c2b2 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 16:06:21 2018 +0200 First function with cassava commit e92aeb151ff527b383ff3d0ced7764e81b71af82 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:47:34 2018 +0200 Added cassava as dependency commit 5ea005c558a3939af7e5f0cd735a9b4da931228e Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:18:47 2018 +0200 Better .gitignore for multi idea modules
2018-09-07 20:12:13 +03:00
# 3. handle conditions assigning multiple fields
<
10/2009/09,Flubber Co,50
RULES
fields date, description, amount
date-format %d/%Y/%m
currency $
account1 assets:myacct
if Flubber
account2 acct
comment cmt
$ ./csvtest.sh
2009-09-10 Flubber Co ; cmt
assets:myacct $50
acct $-50
2019-06-07 00:37:36 +03:00
>=0
2016-10-09 04:20:26 +03:00
# 4. read CSV with balance field
<
10/2009/09,Flubber Co,50,123
RULES
fields date, description, amount, balance
date-format %d/%Y/%m
currency $
account1 assets:myacct
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50 = $123
income:unknown $-50
2019-06-07 00:37:36 +03:00
>=0
2017-06-14 18:54:32 +03:00
# 5. read CSV with empty balance field
<
10/2009/09,Flubber Co,50,123
11/2009/09,Blubber Co,60,
RULES
fields date, description, amount, balance
date-format %d/%Y/%m
currency $
account1 assets:myacct
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50 = $123
income:unknown $-50
2009-09-11 Blubber Co
assets:myacct $60
income:unknown $-60
2019-06-07 00:37:36 +03:00
>=0
2017-06-14 18:54:32 +03:00
# 6. read CSV with only whitespace in balance field
<
10/2009/09,Flubber Co,50,123
11/2009/09,Blubber Co,60,
RULES
fields date, description, amount, balance
date-format %d/%Y/%m
currency $
account1 assets:myacct
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50 = $123
income:unknown $-50
2009-09-11 Blubber Co
assets:myacct $60
income:unknown $-60
2019-06-07 00:37:36 +03:00
>=0
# 7. read CSV with rule double-negating column
<
date,payee,amount
2009/10/9,Flubber Co,50
2009/11/09,Merchant Credit,-60
RULES
skip 1
currency $
fields date, payee, payment
amount -%payment
account1 liabilities:bank
account2 expense:other
$ ./csvtest.sh
2009-10-09
liabilities:bank $-50
expense:other $50
2009-11-09
liabilities:bank $60
expense:other $-60
2019-06-07 00:37:36 +03:00
>=0
csv: merge lucamolteni's cassava/custom separators (squashed) (#829) commit 5ba464de761b298e50d57a8b7d14bc28adb30d5d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:54:12 2018 +0200 Fix CI 2 commit f060ae9449f4b61a915b0ed4629fc1ba9b66fb4a Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:30:08 2018 +0200 Fix CI build commit af0719a33b9b72ad244ae80198d881a1f7145e9d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:19:01 2018 +0200 Fix rebase commit 1a24ddfa54dfb4ff1326e1a51005ffa82d3dc3c8 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:25:24 2018 +0200 Fixed some GHC warnings commit 1ac43398a359b5925ef71f53347698f1c6c510ef Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:14:49 2018 +0200 Fix .cabal commit 422456b925d8aa4ab3e869f51e98c2b1c3dcde0a Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:56:20 2018 +0200 Removed to-do list commit 1118b762e4fd15c4fe7ba48ba86676706ea3a5a5 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:53:28 2018 +0200 Better test commit 1146ed0941655668bf7684f18aa15c5f4b9b20c2 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 15:32:28 2018 +0200 Fix parsing commit 4fc2374b2b81802990da30c96756aab54d77399c Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 22:11:11 2018 +0200 Parsing of separator commit f7a61737f1ad4460ba20ca9b2e86eb21468abb33 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:29:23 2018 +0200 Almost separator in options commit ac8841cf3b9c80914bc3271ad9b9ff4ae9ba48a7 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:16:59 2018 +0200 Separator in parseCSV commit 92a8b9f6ba77ea4237f769641e03029ac88542ea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 13:30:41 2018 +0200 separator option commit ec417a81ae625647cf35e61776cdf02bdb2c6aea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 10:45:26 2018 +0200 Removed one qualified import commit 8b2f386c2f780adcd34cff3de7edceacc1d325a7 Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 14:01:12 2018 +0200 Removed string conversions commit a14d0e099e28a286bb81770cfc9cb8f5c7e5cf1f Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 10:23:20 2018 +0200 custom delimiter in cassava commit 694d48e2bc1ada0037b90367c017f3082f68ed45 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:51:54 2018 +0200 Use Text.getContents - remove UTF-8 compatibility library commit a7ada2cc60033ebdd796ca34cc2ec69a4f387843 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:49:34 2018 +0200 todo list commit 58ec47d3987909f6bace50e3e647e30dadd5bf03 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:45:22 2018 +0200 CSV test now has unicode characters commit b7851e94c3f1683b63ec7250a12bcde3b7bed691 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 16:59:39 2018 +0200 Use decode from Text commit 79f59fd28ccaca08fcd718fcd8d00b1c1d65d7e1 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 13:28:57 2018 +0200 Use Text and Lazy Bytestring commit 470c9bcb8dc00669beb4ef0303a1e7d9f7aecc89 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:30:22 2018 +0200 Use megaparsec error commit f978848ba249ef4f67b855bea5d4e549290c205c Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:22:07 2018 +0200 Renamed qualify and remove Parsec commit 152587fde204c43a55798d212e43f37cd3038c2e Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:12:36 2018 +0200 Use cassava mega parsec commit cf281577a3d3a071196484a6fc8485f2ea1f7d67 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 14:01:47 2018 +0200 Removed Data.Vector commit 1272e8e758369d8cc5778029a705b277355a5029 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:16:18 2018 +0200 Removed Parsec ParseError commit ae07f043135a19307fd65b281ade37a74c76acb2 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:06:14 2018 +0200 Type sinonim for ParsecError commit 8e15b253c11bd1c0c35a7641aeb18aa54e0ba9b0 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:16:08 2018 +0200 Replaced with typeclasses commit 1ed46f9c175603611325f3d377004e4b85f29377 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:01:33 2018 +0200 Replaced Text/CSV with Cassava commit 362f4111b5854145703174b976fc7acbd71b8783 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 10:34:37 2018 +0200 Use cassava parsin instead of Text/CSV commit 83e678e371618687cf7c15a4e2cfa67f570b6b64 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 08:22:51 2018 +0200 Text CSV error messages commit f922df71d274beeacab9fb2530b16c97f005cc08 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:45:20 2018 +0200 Better types commit edd130781c84790a53bff2283e6041eb8232e7cf Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:34:59 2018 +0200 Conversion to Text CSV type commit 0799383214483018ad2d977a3c8022414959c2b2 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 16:06:21 2018 +0200 First function with cassava commit e92aeb151ff527b383ff3d0ced7764e81b71af82 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:47:34 2018 +0200 Added cassava as dependency commit 5ea005c558a3939af7e5f0cd735a9b4da931228e Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:18:47 2018 +0200 Better .gitignore for multi idea modules
2018-09-07 20:12:13 +03:00
2018-09-07 23:42:44 +03:00
# 8. reading with custom separator: SSV (semicolon-separated)
2019-06-07 00:37:36 +03:00
<
csv: merge lucamolteni's cassava/custom separators (squashed) (#829) commit 5ba464de761b298e50d57a8b7d14bc28adb30d5d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:54:12 2018 +0200 Fix CI 2 commit f060ae9449f4b61a915b0ed4629fc1ba9b66fb4a Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:30:08 2018 +0200 Fix CI build commit af0719a33b9b72ad244ae80198d881a1f7145e9d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:19:01 2018 +0200 Fix rebase commit 1a24ddfa54dfb4ff1326e1a51005ffa82d3dc3c8 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:25:24 2018 +0200 Fixed some GHC warnings commit 1ac43398a359b5925ef71f53347698f1c6c510ef Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:14:49 2018 +0200 Fix .cabal commit 422456b925d8aa4ab3e869f51e98c2b1c3dcde0a Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:56:20 2018 +0200 Removed to-do list commit 1118b762e4fd15c4fe7ba48ba86676706ea3a5a5 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:53:28 2018 +0200 Better test commit 1146ed0941655668bf7684f18aa15c5f4b9b20c2 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 15:32:28 2018 +0200 Fix parsing commit 4fc2374b2b81802990da30c96756aab54d77399c Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 22:11:11 2018 +0200 Parsing of separator commit f7a61737f1ad4460ba20ca9b2e86eb21468abb33 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:29:23 2018 +0200 Almost separator in options commit ac8841cf3b9c80914bc3271ad9b9ff4ae9ba48a7 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:16:59 2018 +0200 Separator in parseCSV commit 92a8b9f6ba77ea4237f769641e03029ac88542ea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 13:30:41 2018 +0200 separator option commit ec417a81ae625647cf35e61776cdf02bdb2c6aea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 10:45:26 2018 +0200 Removed one qualified import commit 8b2f386c2f780adcd34cff3de7edceacc1d325a7 Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 14:01:12 2018 +0200 Removed string conversions commit a14d0e099e28a286bb81770cfc9cb8f5c7e5cf1f Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 10:23:20 2018 +0200 custom delimiter in cassava commit 694d48e2bc1ada0037b90367c017f3082f68ed45 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:51:54 2018 +0200 Use Text.getContents - remove UTF-8 compatibility library commit a7ada2cc60033ebdd796ca34cc2ec69a4f387843 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:49:34 2018 +0200 todo list commit 58ec47d3987909f6bace50e3e647e30dadd5bf03 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:45:22 2018 +0200 CSV test now has unicode characters commit b7851e94c3f1683b63ec7250a12bcde3b7bed691 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 16:59:39 2018 +0200 Use decode from Text commit 79f59fd28ccaca08fcd718fcd8d00b1c1d65d7e1 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 13:28:57 2018 +0200 Use Text and Lazy Bytestring commit 470c9bcb8dc00669beb4ef0303a1e7d9f7aecc89 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:30:22 2018 +0200 Use megaparsec error commit f978848ba249ef4f67b855bea5d4e549290c205c Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:22:07 2018 +0200 Renamed qualify and remove Parsec commit 152587fde204c43a55798d212e43f37cd3038c2e Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:12:36 2018 +0200 Use cassava mega parsec commit cf281577a3d3a071196484a6fc8485f2ea1f7d67 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 14:01:47 2018 +0200 Removed Data.Vector commit 1272e8e758369d8cc5778029a705b277355a5029 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:16:18 2018 +0200 Removed Parsec ParseError commit ae07f043135a19307fd65b281ade37a74c76acb2 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:06:14 2018 +0200 Type sinonim for ParsecError commit 8e15b253c11bd1c0c35a7641aeb18aa54e0ba9b0 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:16:08 2018 +0200 Replaced with typeclasses commit 1ed46f9c175603611325f3d377004e4b85f29377 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:01:33 2018 +0200 Replaced Text/CSV with Cassava commit 362f4111b5854145703174b976fc7acbd71b8783 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 10:34:37 2018 +0200 Use cassava parsin instead of Text/CSV commit 83e678e371618687cf7c15a4e2cfa67f570b6b64 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 08:22:51 2018 +0200 Text CSV error messages commit f922df71d274beeacab9fb2530b16c97f005cc08 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:45:20 2018 +0200 Better types commit edd130781c84790a53bff2283e6041eb8232e7cf Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:34:59 2018 +0200 Conversion to Text CSV type commit 0799383214483018ad2d977a3c8022414959c2b2 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 16:06:21 2018 +0200 First function with cassava commit e92aeb151ff527b383ff3d0ced7764e81b71af82 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:47:34 2018 +0200 Added cassava as dependency commit 5ea005c558a3939af7e5f0cd735a9b4da931228e Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:18:47 2018 +0200 Better .gitignore for multi idea modules
2018-09-07 20:12:13 +03:00
10/2009/09;Flubber Co🎅;50;
11/2009/09;Flubber Co🎅;;50
RULES
account1 Assets:MyAccount
date %1
separator ;
date-format %d/%Y/%m
description %2
amount-in %3
amount-out %4
currency $
$ ./csvtest.sh
2009-09-10 Flubber Co🎅
csv: merge lucamolteni's cassava/custom separators (squashed) (#829) commit 5ba464de761b298e50d57a8b7d14bc28adb30d5d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:54:12 2018 +0200 Fix CI 2 commit f060ae9449f4b61a915b0ed4629fc1ba9b66fb4a Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:30:08 2018 +0200 Fix CI build commit af0719a33b9b72ad244ae80198d881a1f7145e9d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:19:01 2018 +0200 Fix rebase commit 1a24ddfa54dfb4ff1326e1a51005ffa82d3dc3c8 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:25:24 2018 +0200 Fixed some GHC warnings commit 1ac43398a359b5925ef71f53347698f1c6c510ef Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:14:49 2018 +0200 Fix .cabal commit 422456b925d8aa4ab3e869f51e98c2b1c3dcde0a Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:56:20 2018 +0200 Removed to-do list commit 1118b762e4fd15c4fe7ba48ba86676706ea3a5a5 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:53:28 2018 +0200 Better test commit 1146ed0941655668bf7684f18aa15c5f4b9b20c2 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 15:32:28 2018 +0200 Fix parsing commit 4fc2374b2b81802990da30c96756aab54d77399c Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 22:11:11 2018 +0200 Parsing of separator commit f7a61737f1ad4460ba20ca9b2e86eb21468abb33 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:29:23 2018 +0200 Almost separator in options commit ac8841cf3b9c80914bc3271ad9b9ff4ae9ba48a7 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:16:59 2018 +0200 Separator in parseCSV commit 92a8b9f6ba77ea4237f769641e03029ac88542ea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 13:30:41 2018 +0200 separator option commit ec417a81ae625647cf35e61776cdf02bdb2c6aea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 10:45:26 2018 +0200 Removed one qualified import commit 8b2f386c2f780adcd34cff3de7edceacc1d325a7 Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 14:01:12 2018 +0200 Removed string conversions commit a14d0e099e28a286bb81770cfc9cb8f5c7e5cf1f Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 10:23:20 2018 +0200 custom delimiter in cassava commit 694d48e2bc1ada0037b90367c017f3082f68ed45 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:51:54 2018 +0200 Use Text.getContents - remove UTF-8 compatibility library commit a7ada2cc60033ebdd796ca34cc2ec69a4f387843 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:49:34 2018 +0200 todo list commit 58ec47d3987909f6bace50e3e647e30dadd5bf03 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:45:22 2018 +0200 CSV test now has unicode characters commit b7851e94c3f1683b63ec7250a12bcde3b7bed691 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 16:59:39 2018 +0200 Use decode from Text commit 79f59fd28ccaca08fcd718fcd8d00b1c1d65d7e1 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 13:28:57 2018 +0200 Use Text and Lazy Bytestring commit 470c9bcb8dc00669beb4ef0303a1e7d9f7aecc89 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:30:22 2018 +0200 Use megaparsec error commit f978848ba249ef4f67b855bea5d4e549290c205c Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:22:07 2018 +0200 Renamed qualify and remove Parsec commit 152587fde204c43a55798d212e43f37cd3038c2e Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:12:36 2018 +0200 Use cassava mega parsec commit cf281577a3d3a071196484a6fc8485f2ea1f7d67 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 14:01:47 2018 +0200 Removed Data.Vector commit 1272e8e758369d8cc5778029a705b277355a5029 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:16:18 2018 +0200 Removed Parsec ParseError commit ae07f043135a19307fd65b281ade37a74c76acb2 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:06:14 2018 +0200 Type sinonim for ParsecError commit 8e15b253c11bd1c0c35a7641aeb18aa54e0ba9b0 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:16:08 2018 +0200 Replaced with typeclasses commit 1ed46f9c175603611325f3d377004e4b85f29377 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:01:33 2018 +0200 Replaced Text/CSV with Cassava commit 362f4111b5854145703174b976fc7acbd71b8783 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 10:34:37 2018 +0200 Use cassava parsin instead of Text/CSV commit 83e678e371618687cf7c15a4e2cfa67f570b6b64 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 08:22:51 2018 +0200 Text CSV error messages commit f922df71d274beeacab9fb2530b16c97f005cc08 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:45:20 2018 +0200 Better types commit edd130781c84790a53bff2283e6041eb8232e7cf Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:34:59 2018 +0200 Conversion to Text CSV type commit 0799383214483018ad2d977a3c8022414959c2b2 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 16:06:21 2018 +0200 First function with cassava commit e92aeb151ff527b383ff3d0ced7764e81b71af82 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:47:34 2018 +0200 Added cassava as dependency commit 5ea005c558a3939af7e5f0cd735a9b4da931228e Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:18:47 2018 +0200 Better .gitignore for multi idea modules
2018-09-07 20:12:13 +03:00
Assets:MyAccount $50
income:unknown $-50
csv: merge lucamolteni's cassava/custom separators (squashed) (#829) commit 5ba464de761b298e50d57a8b7d14bc28adb30d5d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:54:12 2018 +0200 Fix CI 2 commit f060ae9449f4b61a915b0ed4629fc1ba9b66fb4a Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:30:08 2018 +0200 Fix CI build commit af0719a33b9b72ad244ae80198d881a1f7145e9d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:19:01 2018 +0200 Fix rebase commit 1a24ddfa54dfb4ff1326e1a51005ffa82d3dc3c8 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:25:24 2018 +0200 Fixed some GHC warnings commit 1ac43398a359b5925ef71f53347698f1c6c510ef Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:14:49 2018 +0200 Fix .cabal commit 422456b925d8aa4ab3e869f51e98c2b1c3dcde0a Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:56:20 2018 +0200 Removed to-do list commit 1118b762e4fd15c4fe7ba48ba86676706ea3a5a5 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:53:28 2018 +0200 Better test commit 1146ed0941655668bf7684f18aa15c5f4b9b20c2 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 15:32:28 2018 +0200 Fix parsing commit 4fc2374b2b81802990da30c96756aab54d77399c Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 22:11:11 2018 +0200 Parsing of separator commit f7a61737f1ad4460ba20ca9b2e86eb21468abb33 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:29:23 2018 +0200 Almost separator in options commit ac8841cf3b9c80914bc3271ad9b9ff4ae9ba48a7 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:16:59 2018 +0200 Separator in parseCSV commit 92a8b9f6ba77ea4237f769641e03029ac88542ea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 13:30:41 2018 +0200 separator option commit ec417a81ae625647cf35e61776cdf02bdb2c6aea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 10:45:26 2018 +0200 Removed one qualified import commit 8b2f386c2f780adcd34cff3de7edceacc1d325a7 Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 14:01:12 2018 +0200 Removed string conversions commit a14d0e099e28a286bb81770cfc9cb8f5c7e5cf1f Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 10:23:20 2018 +0200 custom delimiter in cassava commit 694d48e2bc1ada0037b90367c017f3082f68ed45 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:51:54 2018 +0200 Use Text.getContents - remove UTF-8 compatibility library commit a7ada2cc60033ebdd796ca34cc2ec69a4f387843 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:49:34 2018 +0200 todo list commit 58ec47d3987909f6bace50e3e647e30dadd5bf03 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:45:22 2018 +0200 CSV test now has unicode characters commit b7851e94c3f1683b63ec7250a12bcde3b7bed691 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 16:59:39 2018 +0200 Use decode from Text commit 79f59fd28ccaca08fcd718fcd8d00b1c1d65d7e1 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 13:28:57 2018 +0200 Use Text and Lazy Bytestring commit 470c9bcb8dc00669beb4ef0303a1e7d9f7aecc89 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:30:22 2018 +0200 Use megaparsec error commit f978848ba249ef4f67b855bea5d4e549290c205c Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:22:07 2018 +0200 Renamed qualify and remove Parsec commit 152587fde204c43a55798d212e43f37cd3038c2e Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:12:36 2018 +0200 Use cassava mega parsec commit cf281577a3d3a071196484a6fc8485f2ea1f7d67 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 14:01:47 2018 +0200 Removed Data.Vector commit 1272e8e758369d8cc5778029a705b277355a5029 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:16:18 2018 +0200 Removed Parsec ParseError commit ae07f043135a19307fd65b281ade37a74c76acb2 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:06:14 2018 +0200 Type sinonim for ParsecError commit 8e15b253c11bd1c0c35a7641aeb18aa54e0ba9b0 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:16:08 2018 +0200 Replaced with typeclasses commit 1ed46f9c175603611325f3d377004e4b85f29377 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:01:33 2018 +0200 Replaced Text/CSV with Cassava commit 362f4111b5854145703174b976fc7acbd71b8783 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 10:34:37 2018 +0200 Use cassava parsin instead of Text/CSV commit 83e678e371618687cf7c15a4e2cfa67f570b6b64 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 08:22:51 2018 +0200 Text CSV error messages commit f922df71d274beeacab9fb2530b16c97f005cc08 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:45:20 2018 +0200 Better types commit edd130781c84790a53bff2283e6041eb8232e7cf Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:34:59 2018 +0200 Conversion to Text CSV type commit 0799383214483018ad2d977a3c8022414959c2b2 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 16:06:21 2018 +0200 First function with cassava commit e92aeb151ff527b383ff3d0ced7764e81b71af82 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:47:34 2018 +0200 Added cassava as dependency commit 5ea005c558a3939af7e5f0cd735a9b4da931228e Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:18:47 2018 +0200 Better .gitignore for multi idea modules
2018-09-07 20:12:13 +03:00
2009-09-11 Flubber Co🎅
csv: merge lucamolteni's cassava/custom separators (squashed) (#829) commit 5ba464de761b298e50d57a8b7d14bc28adb30d5d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:54:12 2018 +0200 Fix CI 2 commit f060ae9449f4b61a915b0ed4629fc1ba9b66fb4a Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:30:08 2018 +0200 Fix CI build commit af0719a33b9b72ad244ae80198d881a1f7145e9d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:19:01 2018 +0200 Fix rebase commit 1a24ddfa54dfb4ff1326e1a51005ffa82d3dc3c8 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:25:24 2018 +0200 Fixed some GHC warnings commit 1ac43398a359b5925ef71f53347698f1c6c510ef Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:14:49 2018 +0200 Fix .cabal commit 422456b925d8aa4ab3e869f51e98c2b1c3dcde0a Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:56:20 2018 +0200 Removed to-do list commit 1118b762e4fd15c4fe7ba48ba86676706ea3a5a5 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:53:28 2018 +0200 Better test commit 1146ed0941655668bf7684f18aa15c5f4b9b20c2 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 15:32:28 2018 +0200 Fix parsing commit 4fc2374b2b81802990da30c96756aab54d77399c Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 22:11:11 2018 +0200 Parsing of separator commit f7a61737f1ad4460ba20ca9b2e86eb21468abb33 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:29:23 2018 +0200 Almost separator in options commit ac8841cf3b9c80914bc3271ad9b9ff4ae9ba48a7 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:16:59 2018 +0200 Separator in parseCSV commit 92a8b9f6ba77ea4237f769641e03029ac88542ea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 13:30:41 2018 +0200 separator option commit ec417a81ae625647cf35e61776cdf02bdb2c6aea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 10:45:26 2018 +0200 Removed one qualified import commit 8b2f386c2f780adcd34cff3de7edceacc1d325a7 Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 14:01:12 2018 +0200 Removed string conversions commit a14d0e099e28a286bb81770cfc9cb8f5c7e5cf1f Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 10:23:20 2018 +0200 custom delimiter in cassava commit 694d48e2bc1ada0037b90367c017f3082f68ed45 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:51:54 2018 +0200 Use Text.getContents - remove UTF-8 compatibility library commit a7ada2cc60033ebdd796ca34cc2ec69a4f387843 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:49:34 2018 +0200 todo list commit 58ec47d3987909f6bace50e3e647e30dadd5bf03 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:45:22 2018 +0200 CSV test now has unicode characters commit b7851e94c3f1683b63ec7250a12bcde3b7bed691 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 16:59:39 2018 +0200 Use decode from Text commit 79f59fd28ccaca08fcd718fcd8d00b1c1d65d7e1 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 13:28:57 2018 +0200 Use Text and Lazy Bytestring commit 470c9bcb8dc00669beb4ef0303a1e7d9f7aecc89 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:30:22 2018 +0200 Use megaparsec error commit f978848ba249ef4f67b855bea5d4e549290c205c Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:22:07 2018 +0200 Renamed qualify and remove Parsec commit 152587fde204c43a55798d212e43f37cd3038c2e Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:12:36 2018 +0200 Use cassava mega parsec commit cf281577a3d3a071196484a6fc8485f2ea1f7d67 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 14:01:47 2018 +0200 Removed Data.Vector commit 1272e8e758369d8cc5778029a705b277355a5029 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:16:18 2018 +0200 Removed Parsec ParseError commit ae07f043135a19307fd65b281ade37a74c76acb2 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:06:14 2018 +0200 Type sinonim for ParsecError commit 8e15b253c11bd1c0c35a7641aeb18aa54e0ba9b0 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:16:08 2018 +0200 Replaced with typeclasses commit 1ed46f9c175603611325f3d377004e4b85f29377 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:01:33 2018 +0200 Replaced Text/CSV with Cassava commit 362f4111b5854145703174b976fc7acbd71b8783 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 10:34:37 2018 +0200 Use cassava parsin instead of Text/CSV commit 83e678e371618687cf7c15a4e2cfa67f570b6b64 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 08:22:51 2018 +0200 Text CSV error messages commit f922df71d274beeacab9fb2530b16c97f005cc08 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:45:20 2018 +0200 Better types commit edd130781c84790a53bff2283e6041eb8232e7cf Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:34:59 2018 +0200 Conversion to Text CSV type commit 0799383214483018ad2d977a3c8022414959c2b2 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 16:06:21 2018 +0200 First function with cassava commit e92aeb151ff527b383ff3d0ced7764e81b71af82 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:47:34 2018 +0200 Added cassava as dependency commit 5ea005c558a3939af7e5f0cd735a9b4da931228e Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:18:47 2018 +0200 Better .gitignore for multi idea modules
2018-09-07 20:12:13 +03:00
Assets:MyAccount $-50
expenses:unknown $50
csv: merge lucamolteni's cassava/custom separators (squashed) (#829) commit 5ba464de761b298e50d57a8b7d14bc28adb30d5d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:54:12 2018 +0200 Fix CI 2 commit f060ae9449f4b61a915b0ed4629fc1ba9b66fb4a Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:30:08 2018 +0200 Fix CI build commit af0719a33b9b72ad244ae80198d881a1f7145e9d Author: Luca Molteni <volothamp@gmail.com> Date: Fri Sep 7 17:19:01 2018 +0200 Fix rebase commit 1a24ddfa54dfb4ff1326e1a51005ffa82d3dc3c8 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:25:24 2018 +0200 Fixed some GHC warnings commit 1ac43398a359b5925ef71f53347698f1c6c510ef Author: Luca Molteni <volothamp@gmail.com> Date: Fri Aug 10 16:14:49 2018 +0200 Fix .cabal commit 422456b925d8aa4ab3e869f51e98c2b1c3dcde0a Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:56:20 2018 +0200 Removed to-do list commit 1118b762e4fd15c4fe7ba48ba86676706ea3a5a5 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 22:53:28 2018 +0200 Better test commit 1146ed0941655668bf7684f18aa15c5f4b9b20c2 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jul 1 15:32:28 2018 +0200 Fix parsing commit 4fc2374b2b81802990da30c96756aab54d77399c Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 22:11:11 2018 +0200 Parsing of separator commit f7a61737f1ad4460ba20ca9b2e86eb21468abb33 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:29:23 2018 +0200 Almost separator in options commit ac8841cf3b9c80914bc3271ad9b9ff4ae9ba48a7 Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 14:16:59 2018 +0200 Separator in parseCSV commit 92a8b9f6ba77ea4237f769641e03029ac88542ea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 13:30:41 2018 +0200 separator option commit ec417a81ae625647cf35e61776cdf02bdb2c6aea Author: Luca Molteni <volothamp@gmail.com> Date: Thu Jun 21 10:45:26 2018 +0200 Removed one qualified import commit 8b2f386c2f780adcd34cff3de7edceacc1d325a7 Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 14:01:12 2018 +0200 Removed string conversions commit a14d0e099e28a286bb81770cfc9cb8f5c7e5cf1f Author: Luca Molteni <volothamp@gmail.com> Date: Wed Jun 20 10:23:20 2018 +0200 custom delimiter in cassava commit 694d48e2bc1ada0037b90367c017f3082f68ed45 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:51:54 2018 +0200 Use Text.getContents - remove UTF-8 compatibility library commit a7ada2cc60033ebdd796ca34cc2ec69a4f387843 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:49:34 2018 +0200 todo list commit 58ec47d3987909f6bace50e3e647e30dadd5bf03 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 17:45:22 2018 +0200 CSV test now has unicode characters commit b7851e94c3f1683b63ec7250a12bcde3b7bed691 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 16:59:39 2018 +0200 Use decode from Text commit 79f59fd28ccaca08fcd718fcd8d00b1c1d65d7e1 Author: Luca Molteni <volothamp@gmail.com> Date: Sun Jun 10 13:28:57 2018 +0200 Use Text and Lazy Bytestring commit 470c9bcb8dc00669beb4ef0303a1e7d9f7aecc89 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:30:22 2018 +0200 Use megaparsec error commit f978848ba249ef4f67b855bea5d4e549290c205c Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:22:07 2018 +0200 Renamed qualify and remove Parsec commit 152587fde204c43a55798d212e43f37cd3038c2e Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 15:12:36 2018 +0200 Use cassava mega parsec commit cf281577a3d3a071196484a6fc8485f2ea1f7d67 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 14:01:47 2018 +0200 Removed Data.Vector commit 1272e8e758369d8cc5778029a705b277355a5029 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:16:18 2018 +0200 Removed Parsec ParseError commit ae07f043135a19307fd65b281ade37a74c76acb2 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 12:06:14 2018 +0200 Type sinonim for ParsecError commit 8e15b253c11bd1c0c35a7641aeb18aa54e0ba9b0 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:16:08 2018 +0200 Replaced with typeclasses commit 1ed46f9c175603611325f3d377004e4b85f29377 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 11:01:33 2018 +0200 Replaced Text/CSV with Cassava commit 362f4111b5854145703174b976fc7acbd71b8783 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 10:34:37 2018 +0200 Use cassava parsin instead of Text/CSV commit 83e678e371618687cf7c15a4e2cfa67f570b6b64 Author: Luca Molteni <volothamp@gmail.com> Date: Sat Jun 9 08:22:51 2018 +0200 Text CSV error messages commit f922df71d274beeacab9fb2530b16c97f005cc08 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:45:20 2018 +0200 Better types commit edd130781c84790a53bff2283e6041eb8232e7cf Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 21:34:59 2018 +0200 Conversion to Text CSV type commit 0799383214483018ad2d977a3c8022414959c2b2 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 16:06:21 2018 +0200 First function with cassava commit e92aeb151ff527b383ff3d0ced7764e81b71af82 Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:47:34 2018 +0200 Added cassava as dependency commit 5ea005c558a3939af7e5f0cd735a9b4da931228e Author: Luca Molteni <volothamp@gmail.com> Date: Fri Jun 8 13:18:47 2018 +0200 Better .gitignore for multi idea modules
2018-09-07 20:12:13 +03:00
2019-06-07 00:37:36 +03:00
>=0
# 9. read CSV with balance2 field
<
10/2009/09,Flubber Co,50,123
RULES
fields date, description, amount, balance2
date-format %d/%Y/%m
currency $
account1 assets:myacct
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50
income:unknown $-50 = $123
2019-06-07 00:37:36 +03:00
>=0
# 10. read CSV with balance1 and balance2 fields
<
10/2009/09,Flubber Co,50,321,123
RULES
fields date, description, amount, balance1, balance2
date-format %d/%Y/%m
currency $
account1 assets:myacct
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50 = $321
income:unknown $-50 = $123
2019-06-07 00:37:36 +03:00
>=0
# 11. More than two postings
<
10/2009/09,Flubber Co,50,321,123,0.234,VAT
RULES
fields date, description, amount, balance1, balance2, amount3,comment3
date-format %d/%Y/%m
currency $
account1 assets:myacct
account3 expenses:tax
account4 the:remainder
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50.000 = $321.000
income:unknown $-50.000 = $123.000
expenses:tax $0.234 ; VAT
the:remainder
>=0
# 12. More than two postings and different currencies
<
10/2009/09,Flubber Co,50,321,123,£,0.234,VAT
RULES
fields date, description, amount, balance1, balance2, currency3, amount3,comment3
date-format %d/%Y/%m
currency $
account1 assets:myacct
account3 expenses:tax
account4 the:remainder
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50 = $321
income:unknown $-50 = $123
expenses:tax £0.234 ; VAT
the:remainder
>=0
2019-10-12 02:06:16 +03:00
# 13. reading CSV with in-field and out-field, where one could be zero
<
10/2009/09,Flubber Co🎅,50,0
11/2009/09,Flubber Co🎅,0.00,50
RULES
account1 Assets:MyAccount
date %1
date-format %d/%Y/%m
description %2
amount-in %3
amount-out %4
currency $
$ ./csvtest.sh
2009-09-10 Flubber Co🎅
2019-10-12 02:06:16 +03:00
Assets:MyAccount $50
income:unknown $-50
2019-10-12 02:06:16 +03:00
2009-09-11 Flubber Co🎅
2019-10-12 02:06:16 +03:00
Assets:MyAccount $-50
expenses:unknown $50
2019-10-12 02:06:16 +03:00
>=0
# 14. multiline descriptions
<
10/2009/09,"Flubber Co
Co
Co
",50
RULES
fields date, description, amount
date-format %d/%Y/%m
currency $
account1 assets:myacct
$ ./csvtest.sh
2009-09-10 Flubber Co Co Co
assets:myacct $50
income:unknown $-50
>=0
# 15. recursive interpolation
<
myacct,10/2009/09,Flubber Co,50,
RULES
fields account1, date, description, amount-in, amount-out
date-format %d/%Y/%m
currency $
if Flubber
account1 assets:%account1
amount-in (%amount-in)
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $-50
expenses:unknown $50
>=0
# 16. Real life-ish paypal parsing example
<
"12/22/2018","06:22:50","PST","Someone","Subscription Payment","Completed","USD","10.00","-0.59","9.41","someone@some.where","simon@joyful.com","123456789","Joyful Systems","","9KCXINCOME:UNKNOWNZXXAX","","57.60",""
RULES
fields date, time, timezone, description, type, status_, currency, grossamount, feeamount, netamount, fromemail, toemail, code, itemtitle, itemid, referencetxnid, receiptid, balance, note
account1 sm:assets:online:paypal
amount1 %netamount
account2 sm:expenses:unknown
account3 JS:expenses:banking:paypal
amount3 %feeamount
balance %18
code %13
currency $
date %1
date-format %m/%d/%Y
description %description for %itemtitle
$ ./csvtest.sh
2018-12-22 (123456789) Someone for Joyful Systems
sm:assets:online:paypal $9.41 = $57.60
sm:expenses:unknown
JS:expenses:banking:paypal $-0.59
>=0
# 17. Show that #415 is fixed
<
"2016/01/01","$1"
"2016/02/02","$1,000.00"
RULES
account1 unknown
amount %2
date %1
date-format %Y/%m/%d
$ ./csvtest.sh | hledger balance -f - --no-total
$-1,001.00 income:unknown
$1,001.00 unknown
>=0
# 18. Conditional skips
<
HEADER
10/2009/09,Flubber Co,50
MIDDLE SKIP THIS LINE
AND THIS
AND THIS ONE
10/2009/09,Flubber Co,50
*** END OF FILE ***
More lines of the trailer here
They all should be ignored
RULES
fields date, description, amount
date-format %d/%Y/%m
currency $
account1 assets:myacct
if HEADER
skip
2019-10-13 01:35:36 +03:00
if
END OF FILE
end
if MIDDLE
skip 3
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50
income:unknown $-50
2009-09-10 Flubber Co
assets:myacct $50
income:unknown $-50
>=0
2019-10-13 00:47:54 +03:00
# 19. Lines with just balance, no amount (#1000)
<
2018-10-15,100
2018-10-16,200
2018-10-17,300
RULES
fields date,bal
balance EUR %bal
date-format %Y-%m-%d
description Assets Update
account1 assets
account2 income
$ ./csvtest.sh
2018-10-15 Assets Update
2019-10-13 00:47:54 +03:00
assets = EUR 100
income
2018-10-16 Assets Update
2019-10-13 00:47:54 +03:00
assets = EUR 200
income
2018-10-17 Assets Update
2019-10-13 00:47:54 +03:00
assets = EUR 300
income
>=0
2019-10-13 01:35:36 +03:00
# 20. Test for #1001 - empty assignment to amount show not eat next line
<
2018-10-15,1
2019-10-13 01:35:36 +03:00
RULES
fields date,amount
amount
comment x
2019-10-13 01:35:36 +03:00
$ ./csvtest.sh
2018-10-15 ; x
2019-10-13 01:35:36 +03:00
>=0
# 21. Amountless postings and conditional third posting
<
"12/22/2018","06:22:50","PST","Someone","Subscription Payment","Completed","USD","10.00","-0.59","9.41","someone@some.where","simon@joyful.com","123456789","Joyful Systems","","9KCXINCOME:UNKNOWNZXXAX","","57.60",""
"12/22/2018","06:22:50","PST","Someone","Empty fee","Completed","USD","10.00","","6.66","someone@some.where","simon@joyful.com","987654321","Joyful Systems","","9KCXINCOME:UNKNOWNZXXAX","","99.60",""
"12/22/2018","06:22:50","PST","Someone","Conditional Empty fee","Completed","USD","10.00","-1.23","7.77","someone@some.where","simon@joyful.com","10101010101","Joyful Systems","","9KCXINCOME:UNKNOWNZXXAX","","88.66",""
RULES
fields date, time, timezone, description, type, status_, currency, grossamount, feeamount, netamount, fromemail, toemail, code, itemtitle, itemid, referencetxnid, receiptid, balance, note
account1 sm:assets:online:paypal
amount1 %netamount
account2 sm:expenses:unknown
account3 JS:expenses:banking:paypal
amount3 %feeamount
balance %18
code %13
currency $
date %1
date-format %m/%d/%Y
description %description for %itemtitle
if Conditional Empty Fee
account3
# XXX skip this one for now, not sure what should be done
# 2018/12/22 (987654321) Someone for Joyful Systems
# sm:assets:online:paypal $6.66 = $99.60
# sm:expenses:unknown
# JS:expenses:banking:paypal
if ,Empty fee
skip
$ ./csvtest.sh
2018-12-22 (123456789) Someone for Joyful Systems
sm:assets:online:paypal $9.41 = $57.60
sm:expenses:unknown
JS:expenses:banking:paypal $-0.59
2018-12-22 (10101010101) Someone for Joyful Systems
sm:assets:online:paypal $7.77 = $88.66
sm:expenses:unknown
>=0
2019-11-13 12:25:37 +03:00
# 22. read CSV with balance-type directive
<
10/2009/09,Flubber Co,50,123
RULES
fields date, description, amount, balance
date-format %d/%Y/%m
2019-11-13 12:25:37 +03:00
balance-type ==*
currency $
account1 assets:myacct
$ ./csvtest.sh
2009-09-10 Flubber Co
assets:myacct $50 ==* $123
income:unknown $-50
>=0
# 23. create unbalanced virtual posting
<
10/2009/09,Flubber Co,50,123
RULES
fields date, description, amount, balance
date-format %d/%Y/%m
currency $
account1 (assets:myacct)
$ ./csvtest.sh
2009-09-10 Flubber Co
(assets:myacct) $50 = $123
>=0
# 24. create balanced virtual posting
<
10/2009/09,Flubber Co,50,-50
RULES
fields date, description, amount1, amount2
date-format %d/%Y/%m
currency $
account1 [assets:myacct]
account2 [assets:another-acct]
$ ./csvtest.sh
2009-09-10 Flubber Co
[assets:myacct] $50
[assets:another-acct] $-50
>=0
# 25. specify reserved word whitespace separator in rules
2020-01-02 19:23:32 +03:00
<
2009/10/01 Flubber Co 50 123
RULES
fields date, description, amount, balance
currency $
account1 (assets:myacct)
separator TAB
$ ./csvtest.sh
2020-01-06 18:41:00 +03:00
2009-10-01 Flubber Co
(assets:myacct) $50 = $123
>=0
# 26. manually setting hledger's default "expenses:unknown"/"income:unknown" names works (#1192)
<
2020-01-01,5
RULES
fields date, amount
account1 a
account2 expenses:unknown
$ ./csvtest.sh
2020-01-01
a 5
expenses:unknown -5
>=0
# 27. match a specific field
<
2020-01-01, 1
2020-01-01, 2
RULES
fields date, desc
if %desc 1
description one
$ ./csvtest.sh desc:one
2020-01-01 one
>=0
# 28. choose unknown account names correctly when no account name is set
# and backwards-compatibly generating two postings.
<
2020-01-01, 1,
RULES
fields date, amount,
$ ./csvtest.sh
2020-01-01
expenses:unknown 1
income:unknown -1
>=0
# 29. choose unknown account name correctly when only account1 is set
# and backwards-compatibly generating second posting.
<
2020-01-01, 1, a
RULES
fields date, amount, account1
$ ./csvtest.sh
2020-01-01
a 1
income:unknown -1
>=0
# 30. leave unknown account name as-is when explicitly set by user (#1192).
<
2020-01-01, 1, a
RULES
fields date, amount, account1
account2 expenses:unknown
$ ./csvtest.sh
2020-01-01
a 1
expenses:unknown -1
>=0
# 31. Can generate a transaction with amount on the first posting only.
<
2020-01-01, 1
RULES
fields date, amount1
account2 b
$ ./csvtest.sh
2020-01-01
expenses:unknown 1
b
>=0
# 32. Can generate a transaction with an amount on the second posting only.
<
2020-01-01, 1
RULES
fields date, amount2
account1 a
$ ./csvtest.sh
2020-01-01
a
expenses:unknown 1
>=0
# 33. The old amount rules convert amount1 to cost in posting 2:
<
2020-01-01, 1
RULES
fields date, amt
amount %amt @@ 1 EUR
$ ./csvtest.sh
2020-01-01
expenses:unknown 1 @@ 1 EUR
income:unknown -1 EUR
>=0
## .
#<
#$ ./csvtest.sh
#>=0
## . A single unbalanced posting with number other than 1 also should not generate a balancing posting.
#<
#2019-01-01,1
#
#RULES
#fields date,amount
#account2 (a)
#
#$ ./csvtest.sh
#2019-01-01
# (a) 1
#
#>=0
#
## . A single posting that's zero also should not generate a balancing posting.
#<
#2019-01-01,0
#
#RULES
#fields date,amount
#account1 a
#
#$ ./csvtest.sh
#2019/01/01
# a 0
#
#>=0
## . With a bracketed account name, the auto-generated second posting should also be bracketed.
#<
#2019-01-01,1
#
#RULES
#fields date,amount
#account1 [a]
#
#$ ./csvtest.sh
#2019/01/01
# [a] 1
# [income:unknown] -1
#
#>=0
2019-06-07 00:37:36 +03:00
# . TODO: without --separator gives obscure error
# |
# 1 | 10/2009/09;Flubber Co🎅;50;
# | ^^^^^^^^^^
# well-formed but invalid date: 10/2009/9
2019-06-07 00:37:36 +03:00
# <
# 10/2009/09;Flubber Co🎅;50;
# 11/2009/09;Flubber Co🎅;;50
# RULES
# account1 Assets:MyAccount
# date %1
# date-format %d/%Y/%m
# description %2
# amount-in %3
# amount-out %4
# currency $
# $ ./csvtest.sh
# 2009/09/10 Flubber Co🎅
# Assets:MyAccount $50
# expenses:unknown $-50
#
# 2009/09/11 Flubber Co🎅
# Assets:MyAccount $-50
# expenses:unknown $50
#
2019-06-07 00:37:36 +03:00
# >=0
2019-06-07 00:37:36 +03:00
# . reading TSV (tab-separated) TODO user error (CSV record ["10/2009/09\tFlubber Co\127877\t50\t"] has less than two fields)
# <
# 10/2009/09 Flubber Co🎅 50
# 11/2009/09 Flubber Co🎅 50
# RULES
# account1 Assets:MyAccount
# date %1
# date-format %d/%Y/%m
# description %2
# amount-in %3
# amount-out %4
# currency $
# $ ./csvtest.sh
# 2009/09/10 Flubber Co🎅
# Assets:MyAccount $50
# expenses:unknown $-50
#
# 2009/09/11 Flubber Co🎅
# Assets:MyAccount $-50
# expenses:unknown $50
#
2019-06-07 00:37:36 +03:00
# >=0