Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embed journal to text document #2090

Open
PSLLSP opened this issue Sep 23, 2023 · 2 comments
Open

embed journal to text document #2090

PSLLSP opened this issue Sep 23, 2023 · 2 comments
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. journal The journal file format, and its features.

Comments

@PSLLSP
Copy link

PSLLSP commented Sep 23, 2023

This is a wish. Could be possible to embed journal to text document? When such document is processed by hledger, only hledger section will be processed.

Current hledger journal can use comments and mark part of text in journal file to be ignored by hledger.

I think that opposite way could be useful too. Have a text file and mark sections those should be processed by hledger. I assume new directive should be added, something similar to comment and end comment. When hledger will be started with some new parameter, it will ignore text until it finds instruction, that next text/block is journal and it will process it. Several such blocks could be in a single file, in similar way like comment and end comment blocks can be in journal...

I can do something like this with current comment and end comment but I think that something similar can be useful for case where journal data are just a small part of text file, like some diary, or notes describing an investment.

@PSLLSP PSLLSP added the A-WISH Some kind of improvement request, hare-brained proposal, or plea. label Sep 23, 2023
@simonmichael
Copy link
Owner

simonmichael commented Oct 5, 2023

I was thinking about this recently. I agree it sounds interesting to have more support for interleaved documentation and journal data, for "literate accounting", something like literate Haskell. I haven't got a clearly valuable, concrete use case in mind yet - do you have one ? Maybe we can collect some workflows to try it out using non-hledger text-munging tools.

@simonmichael simonmichael added the journal The journal file format, and its features. label Oct 5, 2023
@simonmichael
Copy link
Owner

https://hledger.org/editors.html#org-babel is related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. journal The journal file format, and its features.
Projects
None yet
Development

No branches or pull requests

2 participants