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

multiple -f arguments fails if the files are of different format #320

Closed
anarcat opened this issue Jan 29, 2016 · 9 comments
Closed

multiple -f arguments fails if the files are of different format #320

anarcat opened this issue Jan 29, 2016 · 9 comments
Labels
A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. cli Command line parsing, options, arguments and suchlike.

Comments

@anarcat
Copy link

anarcat commented Jan 29, 2016

while investigating timelog support in hledger and ledgercli, i stumbled upon this weird bug where some of the multiple -f arguments are ignored if they are in a different format.

in other words, this prints time entries:

hledger -f timelog p

while this doesn't:

hledger -f timelog -f hledger.lgr p

The sample files are in the https://github.com/anarcat/ledger-timetracking repo, which also demonstrates a compatibility problem when applying accounts before includes, which i believe was fixed in a2b989d.

@simonmichael simonmichael added A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. cli Command line parsing, options, arguments and suchlike. labels Jan 29, 2016
@simonmichael simonmichael added this to the 1.0 milestone Jan 29, 2016
@anarcat
Copy link
Author

anarcat commented Jan 31, 2016

oh, and of course include fails similarly (or worse, actually):

$ hledger -f hledger.lgr bal
using conversion rules file /home/anarcat/src/ledger-timetracking/hledger.lgr.rules
hledger: "/home/anarcat/src/ledger-timetracking/hledger.lgr" (line 2, column 1) in included file "timelog":
"/home/anarcat/src/ledger-timetracking/timelog" (line 1, column 1):
unexpected 'i'
expecting journal transaction or directive or end of input

should that be filed as a separate bug?

@simonmichael
Copy link
Owner

No, this is explicitly disallowed by the docs. But, with luck one fix will resolve both.

simonmichael added a commit that referenced this issue May 18, 2016
journal files can now include journal, timeclock or timedot files (but
not yet CSV files). Also timeclock/timedot files no longer support
default year directives.

The Hledger.Read.* modules have been reorganised for better reuse.
Hledger.Read.Utils has been renamed Hledger.Read.Common and holds
low-level parsers & utilities; high-level read utilities have moved to
Hledger.Read.
@simonmichael
Copy link
Owner

Partly fixed.. "The include directive can only be used in journal files. It can include journal, timeclock or timedot files, but not CSV files."

Eventually, we should be able to include any supported format. I'll leave this open as a reminder.

@simonmichael simonmichael added A-WISH Some kind of improvement request, hare-brained proposal, or plea. and removed A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. labels May 18, 2016
@simonmichael simonmichael removed this from the 1.0 milestone May 18, 2016
@simonmichael simonmichael added the A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. label May 18, 2016
@simonmichael
Copy link
Owner

Ah shoot! I forgot the original -f case. That's still open.

@simonmichael simonmichael reopened this May 18, 2016
simonmichael added a commit that referenced this issue May 18, 2016
When multiple files are specified with multiple -f options, we now
parse each one individually, rather than just concatenating them, so
they can have different formats.

Directives (like default year or account aliases) no longer carry over
from one file to the next. Limitation or feature ?
@simonmichael
Copy link
Owner

Multiple FILES specified on the command line are now parsed individually, so they can have different formats. Directives in one file no longer affect subsequent files. I think this is ok.

@simonmichael simonmichael removed the A-WISH Some kind of improvement request, hare-brained proposal, or plea. label Jul 16, 2016
@z3cko
Copy link

z3cko commented Nov 17, 2020

As this has been closed 4 years ago i guess you could also update your https://github.com/anarcat/ledger-timetracking @anarcat

@anarcat
Copy link
Author

anarcat commented Nov 17, 2020

As this has been closed 4 years ago i guess you could also update your https://github.com/anarcat/ledger-timetracking @anarcat

Patches welcome, I do not use (h)ledger anymore...

@z3cko
Copy link

z3cko commented Nov 23, 2020

I do not use (h)ledger anymore

whaaaat?

@anarcat
Copy link
Author

anarcat commented Nov 23, 2020

whaaaat?

Not sure how to respond to that, which part do you not understand? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. cli Command line parsing, options, arguments and suchlike.
Projects
None yet
Development

No branches or pull requests

3 participants