Thanks for the suggestion, Stanko. While I _could_ do that, it would make
automation more difficult for what I want to accomplish in the future, and
adds a level of indirection, so much more inclined to attempt correct
parsing directly (also, I want an import/export function for the app). Have
used csv in the past though as I do make use of the (excellent) reckon ruby
gem to ML my category entry though from bank csv files, but this is a
different animal here.

Perhaps a better approach, is I just share what I've got and ask anyone if
they believe they can improve it or to critique it. I've thrown the Go code
up on a public github gist at:
https://gist.github.com/wakatara/45022740c2167517defd0ddc1eadb506

for both the import/export and the transaction model (please feel free to
shoot holes in the txn model too)
(I definitely know I've benefitted from people just sharing snippets and
entire code before - ie. ledger-pyreport)

The code kinda expects transactions to be in the following format atm to
parse for FX, symbols and currencies. I use a no-fee broker so fixed costs
aren't coded in atm though that needs to be folded in as well.

2020-02-02 CAD-hedged S&P 500 Growth ETF Limit Buy
    Assets:SPYG                                 100 SPYG @ 49.8396 USD
    Assets:CA:Cash                          -6661.30 CAD @ 0.74822297 USD

ciao!
Daryl.




On Fri, Mar 14, 2025 at 7:18 AM <[email protected]> wrote:

> [email protected]
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/ledger-cli/topics>
>  Google
> Groups
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview>
>  [image:
> Google Groups Logo]
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview>
> Today's topic summary
> View all topics
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/ledger-cli/topics>
>
>    - Abridged summary of [email protected] - 1 update in 1 topic
>    <#m_-6720760755776113626_group_thread_0> - 1 Update
>
> Abridged summary of [email protected] - 1 update in 1 topic
> <http://groups.google.com/group/ledger-cli/t/56a0393f36bc7220?utm_source=digest&utm_medium=email>
> Stanko Trček <[email protected]>: Mar 13 09:22AM +0100
>
> A possible solution is to export a CSV file from the ledger-cli program,
> possibly modifying the export format to prevent the need for parsing the
> original ledger-cli format.
>
> ...more
> <http://groups.google.com/group/ledger-cli/msg/1668b19364d38?utm_source=digest&utm_medium=email>
> Back to top <#m_-6720760755776113626_digest_top>
> You received this digest because you're subscribed to updates for this
> group. You can change your settings on the group membership page
> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/ledger-cli/join>
> .
> To unsubscribe from this group and stop receiving emails from it send an
> email to [email protected].
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/ledger-cli/CAL9aZktQMPb%2B1TowODyHSzbW9cPvhZSn_Prms4Ymdmuu-RaM0w%40mail.gmail.com.

Reply via email to