simonmichael / hledger

Robust, fast, intuitive plain text accounting tool with CLI, TUI and web interfaces.
https://hledger.org
GNU General Public License v3.0
2.98k stars 317 forks source link

How to convert CSV to multi-line comments? #996

Open sorsasampo opened 5 years ago

sorsasampo commented 5 years ago

In my CSV use case there is a lot of auxiliary data that I want to add as tags. However, I would like to print one line per tag, instead of one really long line.

Instead of:

2019/03/21 PAYEE    ; tag1:value1, tag2:reallylongvalue2, tag3:value3, ...

I would like to have:

2019/03/21 PAYEE
    ; tag1: value1
    ; tag2: reallylongvalue2
    ; tag3: value3
    ...

Is there currently any way to have multi-line comments?

adept commented 5 years ago

On linux/macos you can put a different separator there and pass it though sed, something like sed -e 's/#/\n ; /g' (with # as the separator)

On Thu, Mar 21, 2019 at 8:33 AM sorsasampo notifications@github.com wrote:

In my CSV use case there is a lot of auxiliary data that I want to add as tags. However, I would like to print one line per tag, instead of one really long line.

Instead of:

2019/03/21 PAYEE ; tag1:value1, tag2:reallylongvalue2, tag3:value3, ...

I would like to have:

2019/03/21 PAYEE ; tag1: value1 ; tag2: reallylongvalue2 ; tag3: value3 ...

Is there currently any way to have multi-line comments?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/simonmichael/hledger/issues/996, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHNKi5u5jg2noAKAJE2K6wIfvY6a-t-ks5vY0PIgaJpZM4cA7VN .

-- D. Astapov