# This matches numerical filenames:include <->.journal
In other words, the rule is that my LEDGER_FILE always points to something that does four things:
- Define any necessary aliases (since they can't be included).
- Include global configuration.
- Establish opening balances on the day prior to the target period.
- Include transactions in some target range.
# This matches numerical filenames:include <->.journalReally! How does that work ?
<m-n>
- Matches any integer in the range m to n, inclusive. The range may be open-ended by leaving out either number:
"<->"
, for instance, matches any integer.
I wonder what you'd think of using balance assignments as in my 12/28 "Simplifying multiple year files, closing/opening balances" post.
On Jan 1, 2024, at 11:01, Peter Sagerson <peter.s...@gmail.com> wrote:I recently settled on an arrangement that seems to be working well for me. It uses a number of files, so it may or may not be over your complexity threshold.
- My root hledger data directory contains a journal file for each year (e.g. 2023.journal). These contain only transactions, plus perhaps minimal directives like decimal-mark or Y.
- Global configuration (accounts, commodities, prices, etc.) live in files inside a "global" subdirectory.
- The root also contains a couple of top-level journal files, which provide a bit of indirection and tie everything together:
all.journal:# Alias directives at the top, if needed.include global/*.journal# This matches numerical filenames:include <->.journalcurrent.journal:# Alias directives at the top, if neededinclude global/*.journal# Output of hledger close --open -p 2022 (date adjusted):2022-12-31 Opening balances...include 2023.journal
LEDGER_FILE normally points to current.journal for speed, but I can switch it to all.journal to look at past years or year-over-year reports. And I can always add additional top-level journals (previous.journal, etc.) if needed.
I'm following up on this as I gather notes at #2151. Am I right in thinking your setup is a variant of https://github.com/simonmichael/hledger/issues/2151#issuecomment-1885306843 > method E ? Would you agree generally with my Simpler methods (E,F) > busywork remarks there?
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/3f8deb2e-bf69-4b5c-8861-a2d1580d86a8%40app.fastmail.com.
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/2D2540DC-BC6B-4FC4-BB42-190DF6FE572C%40joyful.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/CAAOg-BfGdAfMHhrkGJ0MYSQu-H5CfKsacEDwmGD6TK1mCTLwrQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/3A41EFF8-7B12-42C5-A9CA-885755505233%40joyful.com.