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

timedot: add payee/description and trailing comment/tags #1754

Closed
linuxcaffe opened this issue Nov 14, 2021 · 17 comments
Closed

timedot: add payee/description and trailing comment/tags #1754

linuxcaffe opened this issue Nov 14, 2021 · 17 comments
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. timedot The timedot file format.

Comments

@linuxcaffe
Copy link

linuxcaffe commented Nov 14, 2021

The most awesome timedot would be even awesomer with a description (payee field).
Currently a timedot entry carries no description, but can handle a trailing comment.

<acct:sub:sub><spaces><qtty><spaces><;><comment>

This enhancement would use the comment as description.

@linuxcaffe linuxcaffe added the A-WISH Some kind of improvement request, hare-brained proposal, or plea. label Nov 14, 2021
@linuxcaffe
Copy link
Author

Closed in favour of #1220 #1220 (comment)

@simonmichael simonmichael added the timedot The timedot file format. label Nov 15, 2021
@simonmichael simonmichael reopened this Nov 15, 2021
@simonmichael
Copy link
Owner

Related to #1220 (comments in timeclock format). Let's keep this one open for timedot specifically.

@simonmichael
Copy link
Owner

Following up on djp's timedot comment there:

  • timedot format supports descriptions, written after the date
  • You can add a ; comment and tags there too, but it's treated as part of the description. Instead we should parse text after semicolon as a comment and tags, as in journal format
  • We should do the same for ; comment on a time dots line, where currently it is ignored.

@linuxcaffe
Copy link
Author

linuxcaffe commented Nov 15, 2021

I'm confused. "timedot supports descriptions".. how? I get an error putting anything after the date. I often put a comment like ;Friday on the line following the date, but..
Does that description relate to the day? Not to each timedot event, right? When I review my ledger combining the timedot and timeclock, using hledger-ui, for example, entries from the timeclock have descriptions, those from timedot do not.
I DO agree that the trailing <spaces>;comment :tags: would be dandy..

copying mockup back to the correct topic

UPDATE; oh what the hell. I've been thinking about a more complete feature set, and considering eeking them out, as the foundational bits get deployed, so as not to cause alarm, but I'm expanding this mockup with status "*" and (number).
All comments, in-line and indented (not including file-comments) would be transaction-comments, as there aren't really "postings".

<acct:sub:sub> <2+ spaces> <qtty> <2+ spaces> <* (123) description text> <2+ spaces> <;> <comment and :tags:>

2021/11/12
sleep                7
job:store            8.5         cleaned, set up xmas decorations
job:mary:reno        ...         * (21024) bathroom drain repair       ; sink didn't fit :plumbing:invoice:
   ; Mary suggests retrofitting the old one :scrapyard:
ent:reading          .... .      Kurt Vonnegut - Cat's Cradle          ; insane! loved it! :fiction:funny:
phys:workout         25min       ; reps: 305

@simonmichael
Copy link
Owner

Eg:

* 2021-11-14 Sun
fos.hledger              .... .... .
$ hledger -f a.timedot print desc:sun
2021-11-14 * Sun
    (fos.hledger)            2.25

@simonmichael
Copy link
Owner

(It works for me at least back to hledger 1.17..)

@linuxcaffe
Copy link
Author

Oh that's cool on the date (emacsism?) but I'm after a description on the entry

      (fos.hledger)        2.25       more dumb suggestions in irc

@simonmichael
Copy link
Owner

Yes, in that position I propose we should support comments (; comment maybe with a tag:). There's no room for a posting description in our data model.

@simonmichael
Copy link
Owner

Well.. I'm getting confused, I thought the date creates a transaction and each dot line is a posting within it. Actually, each dot line is a separate transaction. (Is that for the best ? I'm not sure.)

@linuxcaffe
Copy link
Author

linuxcaffe commented Nov 15, 2021

yes, it's (nearly) perfect!
Ruminate, maybe there IS room for that description :-D

@linuxcaffe
Copy link
Author

linuxcaffe commented Nov 15, 2021

timedot entries being a one-liner, with an inherited date, is my favorite part of it, but it only has a date, an account and an amount, no description (or comment or tag). I suspect that some of the timedot behaviors you are seeing (Simon) is emacs magic, and none of the leading-* features described work in my editor (vi) and that's ok (for now) . Have another look at the mockup above, and I hope you'll agree that it might be the most concise, most hledgerish way to cram the full data set into a single line.

@linuxcaffe linuxcaffe changed the title RFE; timedot - use trailing comment as payee/description RFE; timedot - add payee/description and trailing comment/tags Nov 15, 2021
@simonmichael
Copy link
Owner

simonmichael commented Nov 17, 2021

@linuxcaffe and I, the current known users of timedot format, discussed this (cf today's #hledger chat log) and made some decisions. We'd like to get better description and comment support in timedot format, along these lines:

2021/11/12 blah
sleep                7
job:store            8.5     cleaned, set up xmas decorations
job:mary:reno        ...     * (21024) bathroom drain repair, sink didn't fit ; plumbing:, invoice:
   ; Mary suggests retrofitting the old one, scrapyard:
ent:reading          .... .  Kurt Vonnegut - Cat's Cradle, insane! loved it! ; fiction:, funny:
phys:workout         25m     ; reps: 305
  • we'll keep generating a separate transaction from each data line, for now at least
  • currently, text following the date is used as a common description for all the day's transactions. In case anyone is using this, it will now be preserved as a tag on the day's transactions, day: or some such.
  • after the time quantity (numeric or dotted), following 2+ spaces, we will read an optional transaction description, and/or semicolon comment, as in journal format
  • additional comment lines below a data line will form additional transaction comment lines
  • a (code) at the start of description could be parsed as the transaction's code
  • a status mark (* or !) at the start could be parsed as the transaction's status. This is more impactful, it implies that timedot transactions would no longer have cleared status by default.

If all of those are implemented, the above would produce transactions like these, queryable in the usual ways:

2021-11-12
    ; day: blah
    (sleep)               7.00

2021-11-12 cleaned, set up xmas decorations
    ; day: blah
    (job:store)           8.50

2021-11-12 * (21024) bathroom drain repair, sink didn't fit  ; plumbing:, invoice: 
    ; Mary suggests retrofitting the old one, scrapyard:
    ; day: blah
    (job:mary:reno)       0.75

2021-11-12 Kurt Vonnegut - Cat's Cradle, insane! loved it!  ; fiction:, funny: 
    ; day: blah
    (ent:reading)         1.25

2021-11-12  ; reps: 305
    ; day: blah
    (phys:workout)        0.41666666666666665
  • Also timedot format should remain essentially simple and easy for others to adopt and implement, so perhaps these will be described as optional "tier 2" features. In the doc there should be a short implementors section communicating this.

@simonmichael simonmichael added the needs:code To unblock: needs code/code updates label Nov 17, 2021
@alhirzel
Copy link
Contributor

alhirzel commented Jul 8, 2022

@simonmichael and/or @linuxcaffe - do either of you know of anyone working this issue at this time? I am a daily user of the timedot format and would like to implement this, as I have wished for the same thing!

@simonmichael
Copy link
Owner

Noone is working on it, be our guest @alhirzel .

@simonmichael
Copy link
Owner

simonmichael commented May 3, 2023

Here's a RFC on changes to timedot format: https://groups.google.com/g/hledger/c/TxoA-xnfvMA/m/QvpmWA5pAwAJ

@simonmichael
Copy link
Owner

Ccing here (and reviewing the discussion above):

I'm fixing/improving timedot's description/comment/tag parsing. But before that..
which do you think is better:

  1. generating little transactions for each line, as we do now:
2023-01-01 
a .... 
b .... 
c .... 

->

2023-01-01 
(a) 1 

2023-01-01 
(b) 1 

2023-01-01 
(c) 1 

Or 2. generating one big transaction per date line ?

2023-01-01 
(a) 1 
(b) 1 
(c) 1 

I don't remember why it's implemented as 1. Right now, 2 looks a little tidier ?
It would be a breaking change (print and register reports would change;
balance reports would not).

The above affects how timedot format can support descriptions and comments (and tags).
Variant 2 would simplify that design space a bit: date lines can end with a transaction
description and comment, time lines can end with a posting comment.

@simonmichael simonmichael changed the title RFE; timedot - add payee/description and trailing comment/tags timedot: add payee/description and trailing comment/tags May 3, 2023
@simonmichael simonmichael removed the needs:code To unblock: needs code/code updates label May 3, 2023
simonmichael added a commit that referenced this issue May 3, 2023
Descriptions and comments are now more straightforward and similar to
journal format.
simonmichael added a commit that referenced this issue May 4, 2023
Descriptions and comments are now more straightforward and similar to
journal format.
@simonmichael
Copy link
Owner

Now implemented in master: https://hledger.org/dev/hledger.html#timedot

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. timedot The timedot file format.
Projects
None yet
Development

No branches or pull requests

3 participants