Thanks for the example (which was sent offline to me). Done here 
<https://github.com/redstreet/beancount_reds_importers/commit/53f25577e92e60778c2df0577b0ccb8550c6dc45>.
 
Use the same pip command to install.

See the run_test.bash here 
<https://github.com/redstreet/beancount_reds_importers/tree/fidelity_csv/beancount_reds_importers/fidelity_csv/examples>
 
and fidelity_csv.import in the same directory for an example of how to 
extract different accounts.

The importer is only for brokerage transactions. Your example contained 
what looked like a checking account, for which it should be trivial to 
write a banking importer in beancount-reds-importers.

Which leads me to ask: have you tried using ofx? See this article: A Word 
About Input Formats - Use OFX When You Can 
<https://reds-rants.netlify.app/personal-finance/a-word-about-input-formats-use-ofx-when-you-can/>

The fidelity ofx importer in beancount-reds-importers works well. You don't 
even need to use your browser, you can set it up to direct download 
<https://reds-rants.netlify.app/personal-finance/direct-downloads/>.

On Friday, June 3, 2022 at 8:09:16 PM UTC-7 Red S wrote:

> Yes, that's easy. Can you send an example .csv without your private data? 
> Or paste a sample row, and the header row here.
>
> On Friday, June 3, 2022 at 7:22:44 PM UTC-7 [email protected] wrote:
>
>> I had a desire to try to keep things as minimal as possible and work 
>> towards understanding what's actually going on before adding something like 
>> beancount_reds (it comes up basically whenever I google an import question) 
>> but taking a look at your example, it does look like it's going to save me 
>> a lot of time getting my fidelity data imported
>>  
>> One question -- have you considered adding support for csv files from 
>> Fidelity that have multiple accounts? Here's the scenario:
>>
>>    - I have many fidelity accounts
>>    - I can export a csv for each one, which would match your example here 
>>    
>> <https://github.com/redstreet/beancount_reds_importers/blob/fidelity_csv/beancount_reds_importers/fidelity_csv/History_for_Account_X99999999.csv>
>>  
>>    exactly 
>>    - I can also go to "all accounts" in fidelity and export one csv for 
>>    everything (columns are `Run Date,Account,Action...` instead of `Run 
>>    Date,Action...`)
>>    - Significant reduction in CSV files that need to be downloaded but 
>>    some code would need to leverage the account column to dynamically update 
>>    the Assets:Fidelity:<account> entry for beancount
>>
>> Appreciating the guidance.
>> On Friday, June 3, 2022 at 10:49:18 AM UTC-7 Red S wrote:
>>
>>> I haven't used csv.py in a while, but use beancount_reds_importers 
>>> <https://github.com/redstreet/beancount_reds_importers> (I'm the 
>>> author).
>>>
>>> If your fidelity csv file looks like this 
>>> <https://github.com/redstreet/beancount_reds_importers/blob/fidelity_csv/beancount_reds_importers/fidelity_csv/History_for_Account_X99999999.csv>,
>>>  
>>> then the fidelity_csv 
>>> <https://github.com/redstreet/beancount_reds_importers/blob/57d25f99921e2ba70b8131ffe4dcccfbc83a6328/beancount_reds_importers/fidelity_csv>
>>>  
>>> importer in beancount_reds_importers 
>>> <https://github.com/redstreet/beancount_reds_importers> should work for 
>>> you. It is under development, but should work for the most part (might be 
>>> missing a few transaction_type_maps). It already has "skip_tail_rows 
>>> <https://github.com/redstreet/beancount_reds_importers/blob/57d25f99921e2ba70b8131ffe4dcccfbc83a6328/beancount_reds_importers/fidelity_csv/__init__.py#L18>"
>>>  
>>> in its config.
>>>
>>> Easiest way to install, if you're interested is:
>>> pip3 install git+
>>> https://github.com/redstreet/beancount_reds_importers.git@fidelity_csv
>>>
>>> Hope that helps.
>>> On Thursday, June 2, 2022 at 10:08:15 PM UTC-7 [email protected] 
>>> wrote:
>>>
>>>> Hey all - CSVs downloaded from Fidelity not only start with some rows 
>>>> to skip but they end in about 11 garbage rows.
>>>>
>>>> I think there's probably a clean solution of adding a skip_last_lines 
>>>> that leverages the existing skip_lines logic (from csv.py)
>>>>
>>>> Anyone know if something like this has been done anywhere? I'm not 
>>>> comfortable enough with csv.py to try to implement that from scratch
>>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/666f206b-6090-4afb-9b15-2b71312c7904n%40googlegroups.com.

Reply via email to