On February 3, 2018 8:46:55 PM GMT+01:00, Martin Blais <[email protected]> wrote:
>On Sat, Feb 3, 2018 at 12:21 PM, 'Patrick Ruckstuhl' via Beancount <
>[email protected]> wrote:
>
>> Hi,
>>
>> I'm looking at some specific cases for importers and wondering what
>the
>> best way to tackle this is:
>>
>>
>> -API based import
>>
>> For some transactions there's a REST api I can use to fetch the
>> transactions.
>>
>> So there is no file to use with the bean-extract framework.
>>
>> I currently created a custom script which works but I would like to
>> unify the different importers if possible.
>>
>
>The original design doc for the importers (
>http://furius.ca/beancount/doc/ingest-design-doc) contains a "fetch"
>stage,
>that was intended to support automation of downloading the files.
>However,
>given the difficulty in doing that over several financial institutions
>(e.g., scraping modern websites is often made really difficult by fancy
>libraries and web UI toolkits), I gave up on that step. There is also
>very
>little common code that I could provide to meaningfully help with that.
>(And OFX doesn't deliver widely enough IMO.)
>
>I submit that you should write a separate script to automate the
>download
>and then run bean-extract on that.
>(At least you won't have to log in manually.)
>

In my case there isn't a file at all, but like I wrote that will work fine with 
a dummy/config file which always stays in download folder

>- Using prices in imports
>>
>> For some imports I would like to enhance the transactions with prices
>> based on current/daily price, I'm currently fetching and storing
>prices
>> in beancount, so prices are available in the beancount file but I'm
>not
>> sure what the best way to hook this into the importer framework is
>>
>
>Fetching prices automatically /is/ OTOH intended to be automated.
>(Note that we're in a funny situation right now with both Yahoo and
>Google
>Finance APIs disabled.)
>
>These are two separate processes at the moment; run one, then the
>other.
>Concatenate to a file if you want to.

That's what I'm doing. What I'm looking is how to access the prices from the 
beancount file in the importer, do I have to parse/load the beancount file o  
my own?

>
>How do you deal with things like that? Do you ignore bean-extract tools
>> and just create independent scripts?
>>
>
>Yep.
>In any case you'll end up with a patchwork of scripts for part of the
>job,
>I just don't believe there's any way around it.
>You're welcome to try your hand at creating reusable code to do this,
>but
>IMO it's all over the place and would be very difficult.
>
>Another idea would be to reuse other people's work in automating
>fetching
>and converting to another common data format, e.g. Yodlee (costs money)
>or
>convert from a Mint download.
>
>

Yeah I see that. The concept of the common importer api is what makes sense for 
me. As this is then usable from fava and allows to avoid having to reimplement 
things like duplicate detection and auto discover of counter accounts 
https://github.com/johannesjh/smart_importer
>
>> Regards,
>>
>> Patrick
>>
>>
>> --
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/beancount/29e70aca-b985-5291-38fc-93c2d80956d4%40ch.tario.org.
>> For more options, visit https://groups.google.com/d/optout.
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/5F43ED0D-F4AC-4445-8FC9-1E234E972994%40ch.tario.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to