Re: autobean-format: deep cleanup, recursive formatting, entry sorting, and more

2023-04-01 Thread Red S
This is...therapeutic :).

I'd long given up on having a neat, consistent ledger sources, given that I 
automate importing and mostly consume my ledger via Beancount (scripts, 
bql, Fava, etc.). But I do occasionally have to open up my ledger, and am 
never satisfied with the ugliness scattered over. autobean-format is a 
magic wand to banish all of that!

For anyone who wants to cross check the basic autobean-format formatting, 
use "git diff --ignore-space-change --ignore-blank-lines". If you don't 
store your ledger under version control, now's a good time to do it.

Thanks a bunch! And I appreciated the --recursive.

On Friday, March 31, 2023 at 3:25:08 PM UTC-7 seia...@gmail.com wrote:

> Hi beancounters,
>
> I've written yet another formatter for beancount, autobean-format 
> , powered by my earlier 
> project autobean-refactor , 
> a library for parsing and programmatically manipulating beancount files.
>
> Highlights:
>
>- Deep cleanup
>   - Unlike bean-format which is regex-based, autobean-format is based 
>   on a proper parser, allowing it to format every corner of your ledger, 
>   including *arithmetic expressions*.
>- Recursive formatting
>   - Optionally formats all included files.
>   - Honors glob include.
>- Sort entries
>   - Optionally sorts dated entries.
>   - Honors "time" meta (HH:MM, HH:MM:SS, epoch seconds, epoch ms, 
>   epoch us).
>   - Honors pushtag / pushmeta.
>   - Preserves existing comments, structure, and ordering whenever 
>   possible.
>- Preview-able
>   - Optionally prints diff.
>- Thousands separators.
>   - Optionally add, remove, or keep (default) thousands separators.
>- Typed and extensible
>   - For example, the code for supporting thousands separator is as 
>   simple as this 
>   
> 
>   .
>
> Please check out autobean-format 
>  if you are interested. Bug 
> reports / suggestions / contributions are appreciated.
>
> Regards,
> SEIAROTg
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/9b4b6361-2e4e-460a-92b4-146c03ec6509n%40googlegroups.com.


Re: ChatGPT & Beancount

2023-04-01 Thread Martin Blais
FYI for those who might be tempted to feed their entire ledger into the
thing, keep in mind the privacy implications of doing this.
The queries are very likely logged and even if used indirectly as training
data for further updates, might leak your personal info to someone else
generating transaction data.
Just saying... it might not be obvious to some.



On Sat, Apr 1, 2023 at 10:51 PM Red S  wrote:

> Very neat! I've got to admit, I'm bowled over by the natural language
> interface working so well.
>
> Amazon purchase classification is almost the only area of classification
> where smart_importer doesn't do greatly well for me, since there are few
> repeat purchases or keywords.
>
> Good to know about aichat too.
>
> That said, here are the results I tried to replicate with the same data.
> Note the claim at the bottom: "You can use any account name you like as
> long as it doesn’t contain spaces," and its incongruency with literally
> every classification containing a space. One of the limitations of the
> current generation is a lack of a confidence-in-results indicator, which
> shows up here.
>
> 2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional
> Sketchbook" Assets:Zero-Sum-Accounts:Amazon-Purchases -24.71 USD
> Expenses:Art Supplies 2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet
> Protectors for 3 Ring Binder, 8.5 x 11 Inch, 200-Pack"
> Assets:Zero-Sum-Accounts:Amazon-Purchases -18.16 USD Expenses:Office
> Supplies 2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429
> Original Equipment Replacement- 12\" (Pack of 1)"
> Assets:Zero-Sum-Accounts:Amazon-Purchases -11.6 USD Expenses:Auto Parts
> 2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop,
> Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control,
> Portable Infrared Burner with T" Assets:Zero-Sum-Accounts:Amazon-Purchases
> -69.43 USD Expenses:Kitchen Appliances 2023-01-26 * "Amazon.com" "PILOT
> Parallel Caligraphy Pens, Assorted Point Sizes and Colors, 6 Count (12722)"
> Assets:Zero-Sum-Accounts:Amazon-Purchases -32.44 USD Expenses:Art Supplies
> 2023-02-28 * "Amazon.com" "Laptop Stand, Laptop Holder Riser Computer
> Stand, Adjustable Aluminum Foldable Portable Notebook Stand, Compatible
> with MacBook Air Pro, HP, Lenovo, D"
> Assets:Zero-Sum-Accounts:Amazon-Purchases -14.29 USD Expenses:Laptop
> Accessories
>
> In this example, I’ve added a category to each transaction by adding a new
> line after the transaction line and indenting it by two spaces. The
> category is specified as an account name and is preceded by a colon. You
> can use any account name you like as long as it doesn’t contain spaces.
>
> On Saturday, April 1, 2023 at 7:51:20 AM UTC-7 ree...@gmail.com wrote:
>
>> I used a command-line tool, aichat ,
>> to pipe transactions to GPT-4 and categorize expenses. I gave it the
>> following input (generated according to Booking Amazon Purchases
>> 
>> ):
>>
>> 2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional
>> Sketchbook"
>>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -24.71 USD
>>
>> 2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet Protectors for 3
>> Ring Binder, 8.5 x 11 Inch, 200-Pack"
>>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -18.16 USD
>>
>> 2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429
>> <(339)%20701-1429> Original Equipment Replacement- 12\" (Pack of 1)"
>>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -11.6 USD
>>
>> 2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop,
>> Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control,
>> Portable Infrared Burner with T"
>>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -69.43 USD
>>
>> 2023-01-26 * "Amazon.com" "PILOT Parallel Caligraphy Pens, Assorted Point
>> Sizes and Colors, 6 Count (12722)"
>>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -32.44 USD
>>
>> 2023-02-28 * "Amazon.com" "Laptop Stand, Laptop Holder Riser Computer
>> Stand, Adjustable Aluminum Foldable Portable Notebook Stand, Compatible
>> with MacBook Air Pro, HP, Lenovo, D"
>>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -14.29 USD
>>
>> Using the following prompt and command:
>>
>> cat amz.beancount | aichat add categorized expense postings to balance
>> each of the following transactions, preserving the included zero sum
>> posting. do not use spaces in account names > out.beancount
>>
>> I got these results:
>>
>> 2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional
>> Sketchbook"
>>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -24.71 USD
>>   Expenses:Art:Instructional-Sketchbook
>>
>> 2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet Protectors for 3
>> Ring Binder, 8.5 x 11 Inch, 200-Pack"
>>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -18.16 USD
>>   Expenses:Office-Supplies:Sheet-Protectors
>>
>> 2022-10-05 * 

Re: ChatGPT & Beancount

2023-04-01 Thread Red S
Very neat! I've got to admit, I'm bowled over by the natural language 
interface working so well.

Amazon purchase classification is almost the only area of classification 
where smart_importer doesn't do greatly well for me, since there are few 
repeat purchases or keywords.

Good to know about aichat too.

That said, here are the results I tried to replicate with the same data. 
Note the claim at the bottom: "You can use any account name you like as 
long as it doesn’t contain spaces," and its incongruency with literally 
every classification containing a space. One of the limitations of the 
current generation is a lack of a confidence-in-results indicator, which 
shows up here.

2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional 
Sketchbook" Assets:Zero-Sum-Accounts:Amazon-Purchases -24.71 USD 
Expenses:Art Supplies 2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet 
Protectors for 3 Ring Binder, 8.5 x 11 Inch, 200-Pack" 
Assets:Zero-Sum-Accounts:Amazon-Purchases -18.16 USD Expenses:Office 
Supplies 2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429 
Original Equipment Replacement- 12\" (Pack of 1)" 
Assets:Zero-Sum-Accounts:Amazon-Purchases -11.6 USD Expenses:Auto Parts 
2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop, 
Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control, 
Portable Infrared Burner with T" Assets:Zero-Sum-Accounts:Amazon-Purchases 
-69.43 USD Expenses:Kitchen Appliances 2023-01-26 * "Amazon.com" "PILOT 
Parallel Caligraphy Pens, Assorted Point Sizes and Colors, 6 Count (12722)" 
Assets:Zero-Sum-Accounts:Amazon-Purchases -32.44 USD Expenses:Art Supplies 
2023-02-28 * "Amazon.com" "Laptop Stand, Laptop Holder Riser Computer 
Stand, Adjustable Aluminum Foldable Portable Notebook Stand, Compatible 
with MacBook Air Pro, HP, Lenovo, D" 
Assets:Zero-Sum-Accounts:Amazon-Purchases -14.29 USD Expenses:Laptop 
Accessories 

In this example, I’ve added a category to each transaction by adding a new 
line after the transaction line and indenting it by two spaces. The 
category is specified as an account name and is preceded by a colon. You 
can use any account name you like as long as it doesn’t contain spaces.

On Saturday, April 1, 2023 at 7:51:20 AM UTC-7 ree...@gmail.com wrote:

> I used a command-line tool, aichat , 
> to pipe transactions to GPT-4 and categorize expenses. I gave it the 
> following input (generated according to Booking Amazon Purchases 
> 
> ):
>
> 2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional 
> Sketchbook"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -24.71 USD
>
> 2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet Protectors for 3 Ring 
> Binder, 8.5 x 11 Inch, 200-Pack"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -18.16 USD
>
> 2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429 
> <(339)%20701-1429> Original Equipment Replacement- 12\" (Pack of 1)"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -11.6 USD
>
> 2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop, 
> Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control, 
> Portable Infrared Burner with T"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -69.43 USD
>
> 2023-01-26 * "Amazon.com" "PILOT Parallel Caligraphy Pens, Assorted Point 
> Sizes and Colors, 6 Count (12722)"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -32.44 USD
>
> 2023-02-28 * "Amazon.com" "Laptop Stand, Laptop Holder Riser Computer 
> Stand, Adjustable Aluminum Foldable Portable Notebook Stand, Compatible 
> with MacBook Air Pro, HP, Lenovo, D"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -14.29 USD
>
> Using the following prompt and command:
>
> cat amz.beancount | aichat add categorized expense postings to balance 
> each of the following transactions, preserving the included zero sum 
> posting. do not use spaces in account names > out.beancount
>
> I got these results:
>
> 2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional 
> Sketchbook"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -24.71 USD
>   Expenses:Art:Instructional-Sketchbook
>
> 2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet Protectors for 3 Ring 
> Binder, 8.5 x 11 Inch, 200-Pack"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -18.16 USD
>   Expenses:Office-Supplies:Sheet-Protectors
>
> 2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429 
> <(339)%20701-1429> Original Equipment Replacement- 12\" (Pack of 1)"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -11.6 USD
>   Expenses:Car:Maintenance
>
> 2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop, 
> Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control, 
> Portable Infrared Burner with T"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -69.43 USD
>   Expenses:Kitchen:Appliances
>

Re: autobean-format: deep cleanup, recursive formatting, entry sorting, and more

2023-04-01 Thread Martin Blais
Added to the contrib doc, thank you for this,

FYI I gave it a spin and hit this error, probably just needs an adjustment
on your parser:

lumia [git|main]:~/src/.../SEIAROTg/autobean-format$ autobean-format $L
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/lark/lexer.py", line 590,
in lex
yield lexer.next_token(lexer_state, parser_state)
  ^^^
  File "/usr/local/lib/python3.11/site-packages/lark/lexer.py", line 528,
in next_token
raise UnexpectedCharacters(lex_state.text, line_ctr.char_pos,
line_ctr.line, line_ctr.column,
lark.exceptions.UnexpectedCharacters: No terminal matches '^' in the
current parser context, at line 68996 col 73

rade:Main:Cash "Intra-Account Transfer" ^td-25441737451
^
Expected one of:
* WHITESPACE
* _NEWLINE_INDENT_COMMENT
* INLINE_COMMENT
* _NEWLINE
* BLOCK_COMMENT
* INDENT

Previous tokens: Token('WHITESPACE', ' ')


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/autobean-format", line 8, in 
sys.exit(main())
 ^^
  File "/usr/local/lib/python3.11/site-packages/autobean_format/main.py",
line 79, in main
for file in formatter.load_files(filename):
  File "/usr/local/lib/python3.11/site-packages/autobean_format/main.py",
line 45, in load_files
model = self._parser.parse(text, models.File)
^
  File
"/usr/local/lib/python3.11/site-packages/autobean_refactor/parser.py", line
135, in parse
return self._parse(text, target, self._lark)
   ^
  File
"/usr/local/lib/python3.11/site-packages/autobean_refactor/parser.py", line
156, in _parse
for token in parser.lexer_thread.lex(parser.parser_state):
  File
"/usr/local/lib/python3.11/site-packages/autobean_refactor/parser.py", line
54, in process
for token in stream:
  File "/usr/local/lib/python3.11/site-packages/lark/lexer.py", line 599,
in lex
raise UnexpectedToken(token, e.allowed, state=parser_state,
token_history=[last_token],
terminals_by_name=self.root_lexer.terminals_by_name)
lark.exceptions.UnexpectedToken: Unexpected token Token('LINK',
'^td-25441737451') at line 68996, column 73.
Expected one of:
* WHITESPACE
* _NEWLINE_INDENT_COMMENT
* INLINE_COMMENT
* _NEWLINE
* BLOCK_COMMENT
* INDENT
Previous tokens: [Token('WHITESPACE', ' ')]




On Fri, Mar 31, 2023 at 6:25 PM Archimedes Smith  wrote:

> Hi beancounters,
>
> I've written yet another formatter for beancount, autobean-format
> , powered by my earlier
> project autobean-refactor ,
> a library for parsing and programmatically manipulating beancount files.
>
> Highlights:
>
>- Deep cleanup
>   - Unlike bean-format which is regex-based, autobean-format is based
>   on a proper parser, allowing it to format every corner of your ledger,
>   including *arithmetic expressions*.
>- Recursive formatting
>   - Optionally formats all included files.
>   - Honors glob include.
>- Sort entries
>   - Optionally sorts dated entries.
>   - Honors "time" meta (HH:MM, HH:MM:SS, epoch seconds, epoch ms,
>   epoch us).
>   - Honors pushtag / pushmeta.
>   - Preserves existing comments, structure, and ordering whenever
>   possible.
>- Preview-able
>   - Optionally prints diff.
>- Thousands separators.
>   - Optionally add, remove, or keep (default) thousands separators.
>- Typed and extensible
>   - For example, the code for supporting thousands separator is as
>   simple as this
>   
> 
>   .
>
> Please check out autobean-format
>  if you are interested. Bug
> reports / suggestions / contributions are appreciated.
>
> Regards,
> SEIAROTg
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/962be409-86aa-4fed-859e-2ff983fe0d95n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Re: ChatGPT & Beancount

2023-04-01 Thread Martin Blais
Mind blown *poofff*

On Sat, Apr 1, 2023 at 10:51 AM Reed Law  wrote:

> I used a command-line tool, aichat ,
> to pipe transactions to GPT-4 and categorize expenses. I gave it the
> following input (generated according to Booking Amazon Purchases
> 
> ):
>
> 2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional
> Sketchbook"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -24.71 USD
>
> 2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet Protectors for 3 Ring
> Binder, 8.5 x 11 Inch, 200-Pack"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -18.16 USD
>
> 2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429
> Original Equipment Replacement- 12\" (Pack of 1)"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -11.6 USD
>
> 2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop,
> Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control,
> Portable Infrared Burner with T"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -69.43 USD
>
> 2023-01-26 * "Amazon.com" "PILOT Parallel Caligraphy Pens, Assorted Point
> Sizes and Colors, 6 Count (12722)"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -32.44 USD
>
> 2023-02-28 * "Amazon.com" "Laptop Stand, Laptop Holder Riser Computer
> Stand, Adjustable Aluminum Foldable Portable Notebook Stand, Compatible
> with MacBook Air Pro, HP, Lenovo, D"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -14.29 USD
>
> Using the following prompt and command:
>
> cat amz.beancount | aichat add categorized expense postings to balance
> each of the following transactions, preserving the included zero sum
> posting. do not use spaces in account names > out.beancount
>
> I got these results:
>
> 2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional
> Sketchbook"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -24.71 USD
>   Expenses:Art:Instructional-Sketchbook
>
> 2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet Protectors for 3 Ring
> Binder, 8.5 x 11 Inch, 200-Pack"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -18.16 USD
>   Expenses:Office-Supplies:Sheet-Protectors
>
> 2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429
> Original Equipment Replacement- 12\" (Pack of 1)"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -11.6 USD
>   Expenses:Car:Maintenance
>
> 2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop,
> Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control,
> Portable Infrared Burner with T"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -69.43 USD
>   Expenses:Kitchen:Appliances
>
> 2023-01-26 * "Amazon.com" "PILOT Parallel Caligraphy Pens, Assorted Point
> Sizes and Colors, 6 Count (12722)"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -32.44 USD
>   Expenses:Art:Calligraphy-Pens
>
> 2023-02-28 * "Amazon.com" "Laptop Stand, Laptop Holder Riser Computer
> Stand, Adjustable Aluminum Foldable Portable Notebook Stand, Compatible
> with MacBook Air Pro, HP, Lenovo, D"
>   Assets:Zero-Sum-Accounts:Amazon-Purchases  -14.29 USD
>   Expenses:Office-Supplies:Laptop-Stand
>
> There was some trial and error that resulted in the final prompt. At
> first, it removed the zero-sum postings and only output expenses. The
> expense accounts had spaces in their names (e.g. "Expenses:Office
> Supplies:Laptop Stand"). There is still room for improvement (I don't
> really care to have an account for laptop stands). Overall, it looks very
> helpful. Perhaps a good workflow is to use GPT to categorize a small batch
> of expenses, manually correct them, and then use smart_importer
>  to handle the rest.
>
> If anyone else has tips please share!
>
>
> On Saturday, April 1, 2023 at 1:53:46 AM UTC-4 Red S wrote:
>
>> Great idea. Talk about drudgery!
>>
>> On Friday, March 31, 2023 at 12:35:09 AM UTC-7 bl...@furius.ca wrote:
>>
>> I haven't tried yet but my hope is that gpt would be great at writing
>> test code. Can you imagine?
>>
>> On Fri, Mar 31, 2023, 01:03 Red S  wrote:
>>
>> Fantastic! Hooray for reducing drudgery!
>>
>> It's apparently quite effective at using code from existing github
>> projects. I love the code explanations in natural language.
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/38f90ec4-fea3-4794-98de-4d90f28c960dn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving 

Re: ChatGPT & Beancount

2023-04-01 Thread Reed Law
I used a command-line tool, aichat , to 
pipe transactions to GPT-4 and categorize expenses. I gave it the following 
input (generated according to Booking Amazon Purchases 

):

2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional 
Sketchbook"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -24.71 USD

2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet Protectors for 3 Ring 
Binder, 8.5 x 11 Inch, 200-Pack"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -18.16 USD

2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429 Original 
Equipment Replacement- 12\" (Pack of 1)"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -11.6 USD

2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop, 
Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control, 
Portable Infrared Burner with T"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -69.43 USD

2023-01-26 * "Amazon.com" "PILOT Parallel Caligraphy Pens, Assorted Point 
Sizes and Colors, 6 Count (12722)"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -32.44 USD

2023-02-28 * "Amazon.com" "Laptop Stand, Laptop Holder Riser Computer 
Stand, Adjustable Aluminum Foldable Portable Notebook Stand, Compatible 
with MacBook Air Pro, HP, Lenovo, D"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -14.29 USD

Using the following prompt and command:

cat amz.beancount | aichat add categorized expense postings to balance each 
of the following transactions, preserving the included zero sum posting. do 
not use spaces in account names > out.beancount

I got these results:

2022-08-19 * "Amazon.com" "Beginning Drawing Atelier: An Instructional 
Sketchbook"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -24.71 USD
  Expenses:Art:Instructional-Sketchbook

2022-09-14 * "Amazon.com" "Amazon Basics Clear Sheet Protectors for 3 Ring 
Binder, 8.5 x 11 Inch, 200-Pack"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -18.16 USD
  Expenses:Office-Supplies:Sheet-Protectors

2022-10-05 * "Amazon.com" "Bosch Rear Wiper Blade H307 /3397011429 Original 
Equipment Replacement- 12\" (Pack of 1)"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -11.6 USD
  Expenses:Car:Maintenance

2023-01-26 * "Amazon.com" "Duxtop 1600W Single Burner Electric Cooktop, 
Electric Hot Plate for Cooking, Electric Stove with Sensor Touch Control, 
Portable Infrared Burner with T"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -69.43 USD
  Expenses:Kitchen:Appliances

2023-01-26 * "Amazon.com" "PILOT Parallel Caligraphy Pens, Assorted Point 
Sizes and Colors, 6 Count (12722)"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -32.44 USD
  Expenses:Art:Calligraphy-Pens

2023-02-28 * "Amazon.com" "Laptop Stand, Laptop Holder Riser Computer 
Stand, Adjustable Aluminum Foldable Portable Notebook Stand, Compatible 
with MacBook Air Pro, HP, Lenovo, D"
  Assets:Zero-Sum-Accounts:Amazon-Purchases  -14.29 USD
  Expenses:Office-Supplies:Laptop-Stand

There was some trial and error that resulted in the final prompt. At first, 
it removed the zero-sum postings and only output expenses. The expense 
accounts had spaces in their names (e.g. "Expenses:Office Supplies:Laptop 
Stand"). There is still room for improvement (I don't really care to have 
an account for laptop stands). Overall, it looks very helpful. Perhaps a 
good workflow is to use GPT to categorize a small batch of expenses, 
manually correct them, and then use smart_importer 
 to handle the rest.

If anyone else has tips please share!


On Saturday, April 1, 2023 at 1:53:46 AM UTC-4 Red S wrote:

> Great idea. Talk about drudgery!
>
> On Friday, March 31, 2023 at 12:35:09 AM UTC-7 bl...@furius.ca wrote:
>
> I haven't tried yet but my hope is that gpt would be great at writing test 
> code. Can you imagine?
>
> On Fri, Mar 31, 2023, 01:03 Red S  wrote:
>
> Fantastic! Hooray for reducing drudgery!
>
> It's apparently quite effective at using code from existing github 
> projects. I love the code explanations in natural language.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/38f90ec4-fea3-4794-98de-4d90f28c960dn%40googlegroups.com.