So the thing about beancount is that it's just python. It sounds like
you're using a library to parse QIF files, but anything you can parse into
python can be fed into an importer. So just...figure out how to extract the
relevant information from those emails and use whatever importer you think
is the most similar as a starting point.

For example, when I was writing an importer for my credit card statements this
code
<https://github.com/beancount/beancount/blob/v2/examples/ingest/office/importers/utrade/utrade_csv.py>
as a starting point. And the actual parsing is just python's standard csv
library.

As for your specific case with the emails, that looks like some bespoke
string parsing so I'd just throw regexes at the emails until you have the
substrings you want.

That's what I did in my case, and it's what I'd probably do in your case.
But if you want very fast ledger updates
<https://reds-rants.netlify.app/personal-finance/the-five-minute-ledger-update/>,
then you should look into using ofx
<https://reds-rants.netlify.app/personal-finance/a-word-about-input-formats-use-ofx-when-you-can/>
for your imports. It's on my wishlist for my own workflow, I just haven't
gotten around to it yet.

Sincerely,
Timothy Jesionowski


On Sat, Jan 6, 2024 at 2:02 PM 'Patrick Ruckstuhl' via Beancount <
beancount@googlegroups.com> wrote:

> Hi,
>
> not exactly the same case, but related.
>
>
> I created an importer which wrapps around other importers for
> attachments,
> https://tariochbctools.readthedocs.io/en/latest/importers.html#mail-adapter
>
> Maybe you can use some of it as a base for your importer.
>
>
> Regards,
>
> Patrick
>
>
> On 06.01.2024 19:57, 'Aaron Axvig' via Beancount wrote:
> > Hello, new Beancount user of a few weeks here.  I'm cutting over from
> > Quicken as of the first of the year.  The import was a lot of work but
> > I have fiddled my way to a beautiful 61,000 line file of converted
> > data.  Some fixing of QIF parsers and converters, and lots of fixing
> > my old data.  Quicken allows some real garbage!
> >
> > Anyways, as I get ready to do my first import of transactions directly
> > into Beancount, it occurs to me that I get an email of every
> > transaction that occurs on my credit cards.  With some email rules and
> > cron jobs this could potentially keep my credit card accounts
> > perpetually up to date on at least a daily basis if not better.  And
> > it would be verified on a monthly basis with ending balances, etc.
> >
> > Has anyone put some thought into this technique?  Any roadblocks? Are
> > any parts of such a processing flow already built?
> >
> > Some sample data from emails is below.  I think account, amount,
> > merchant, and date is all one needs?
> >
> > Example 1:
> >
> > You made a $5.36 transaction
> > Account     Visa (...1234)
> > Date     Jan 1, 2024 at 12:00 PM ET
> > Merchant     GOOGLE *SomeApp
> > Amount     $5.36
> >
> > Example 2:
> >
> > Amount: $16.07
> > Card Ending In 4321
> > Merchant ETSY, INC. 718-8557955 US
> > Date 01/02/2024
> > Time 10:19 AM E
> >
>
> --
> 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/f56658f7-92e0-4d2f-8646-a28e6117424a%40tario.org
> .
>

-- 
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/CAOVsoWTd1Y0M-%3D-7R7OPJN%3DRVtCRu5uYRtHzcAUX0Jtwkcc6-g%40mail.gmail.com.

Reply via email to