bradyt / cone

A ledger.
https://cone.tangential.info
20 stars 5 forks source link

Include time in the datetime stamp #79

Closed cauerego closed 3 years ago

cauerego commented 3 years ago

Using android 0.2.20.

Looks like ledger does support it, even if it's not standard.

Do you think this is simple enough? If so, I could dig it up and send you a pull request. 😘

bradyt commented 3 years ago

Can you be more specific about what "include time in the datetime stamp" means? Perhaps an example?

Can you be more specific about how ledger supports it? Is this documented somewhere?

bradyt commented 3 years ago

Regarding:

Do you think this is simple enough? If so, I could dig it up and send you a pull request. 😘

Nothing is set in stone, but I think if/when I get back to this project, I'll probably prioritize some consideration of how to smooth out maintenance and deployment.

I'm still not sure what sort of syntax you are describing, but if it's just something that goes in a comment, I do think the app needs some way to add comments to a file/transaction/posting.

cauerego commented 3 years ago

i had found datetime support in the docs mentioning an instance with %[%Y/%m/%d %H:%M:%S] but it looks like ledger doesn't really support the time part.

no idea why the 13:37 seem to not be accounted for, in practice:

2011/03/15 13:37   Trader Joe's
    Expenses:Groceries   $100.00
    Assets:Checking

the problem with cone not recognizing it, though, is this messes up the biggest feature of cone: the auto complete.

as for smoothing development, perhaps you want to consider fossil-scm. or, if you really want to stick with git, at least sourcehut.

both have a more conscious community for now, since they're small. but fossil is way more consolidated and have better incentives than git, for versioning and, thus, deployment.

ps: i use lowercase style with purpose. why do you feel compelled to edit it?

bradyt commented 3 years ago

ps: i use lowercase style with purpose. why do you feel compelled to edit it?

Thought this was interesting:

Do you think everyone could use lowercase in all situations? Textbooks, novels, etc?

cauerego commented 3 years ago

i think that's overthinking. and it's not even written in lowercase!

here: cregox.net

of course it can be used everywhere. any style can be used in all situations.

in my case, i don't have a regular keyboard and the one i have i hardly used. it's all in android and it is a bigger effort to keep it lowercase.

also i disagree with it being easier even with a keyboard though. to me i can type either way effortlessly in a keyboard.

i just believe that the uppercase style is obsolete and it was never too logical. so now i prefer to have the upper letters for disambiguation or emphasis, rather than style.

above all, this went way offtopic!

anything to say about my first question? 😁

bradyt commented 3 years ago

anything to say about my first question? 😁

I've lost track, your description is spread out across the issue title, first issue comment, and a reply to some requests for clarification. If you feel something is left answered, you can save me time by restating the aspect of your question you feel is unanswered, clearly and completely. I appreciate you taking the time to describe this. If you can list your unanswered questions in a way that makes it easier for me to reply, it will save me time. Please be very explicit and enumerate what you are asking of me, and if you are asking me about timeframes.

cauerego commented 3 years ago

standard ledger notation (pay attention to the date):

2011/03/15   Trader Joe's
    Expenses:Groceries   $100.00
    Assets:Checking

now same item, but with datetime:

2011/03/15 13:37   Trader Joe's
    Expenses:Groceries   $100.00
    Assets:Checking

i just want that the date field in cone could account for datetime.

still not sure if ledger-cli itself uses it, but it sure should.

bradyt commented 3 years ago

These threads seem relevant:

(To find these, I did an internet search for "hledger timestamp" and "beancount timestamp". Ledger as a search term is a little harder to search for, so I searched their mailing list directly for "timestamp".)

One response that I see in at least one of those threads, I think I should emulate here, that is, I should ask what your usecase is. What are some of your personal reasons for needing the timestamp? Don't get me wrong, I agree that it is natural to wonder why we don't have timestamps. But you can see from the threads above that that has not yet automatically warranted adding the feature to any of the three most popular variants. I think transity offers this, and, well, it is a pipedream of mine to make this app somehow compatible with all three formats, possibly transity as well, not sure how realistic that is, so far its lackings seem to have already spawned the beancount-mobile app, for example the description field is different. And I have not tried at all to look at how we might merge the transity format as an option.

Some other ideas I've been thinking of, on the matter.

Location: In those threads, they are putting the timestamp in a different place. That may avoid breaking the existing autocomplete. For example, if it's at the end of the description, you can already get the completion which is currently oriented in some sense, to the beginning of the description. Probably the resultant completions should ignore comments, so if I write Trader Joe's ; 13:37, then the next transaction I write maybe should only show Trader Joe's as a completion, not the full string with the comment, Trader Joe's ; 13:37. I just tried it on the more recent but hacked together iOS version of cone, and I had to delete the previous timestamp after using the autocompletion. Maybe completion results could include both the version with the comment, and a version without. Not too sure on that one.

External tools: I couldn't quickly find such, but I feel like Android must have some apps that help users insert timestamps of arbitrary formatting in arbitrary text fields. So maybe the app could insert the entire ; 13:37 string for you.

Commenting feature for cone: One feature that may assist in this, is adding some commenting features for cone, which might help a little bit with this current issue, but also handle many other issues, like if you wanted a comment for a transaction like, ;; This transaction is a correction of the previous one, delete the previous transaction when you are at home with a proper text editor. So I'd like to be able to add trailing comments to a line, comment lines to a transaction, and even comments as a block, potentially. Maybe that would help with justifying the splitting of the completion results as well, that is, splitting out the comment from the description autocompletion.

I hope these ideas push the discussion forward, and possibly give some more workflow ideas to get this to work for you in the short term. Happy to expand on the ideas, and discuss the issue, but don't know when I will be making time to touch code (or even add commits to repo).

Sorry for the long message.

If I had more time, I would have written a shorter letter. -- Marcus Tullius Cicero

cauerego commented 3 years ago

awesome! thanks for finding the links, i was indeed having issues to find relevant info around ledger-cli.

someone there mentions ledger indeed won't take the time in consideration, but it will still work. just truncate and ignore the time. to me, this is fine.

i want the time for 3 reasons:

i don't like adding the time in any other way than the right way™. the auto complete still works like this. it's just not ideal, because i have to add the time later.

back to the main question

do you think that just adding the time into the current date field for cone is simple enough? and, perhaps more importantly, would you take a PR if i do it?

if i can do it, i'm convinced it'll be worth it for me (thanks, again, to your latest post! 😘)

great cicero quote, even if it wasn't really him who said it. 🤣

let me know if you do need it shorter again. i can find time to get this done.

bradyt commented 3 years ago

i don't like adding the time in any other way than the right way™.

Okay, closing issue. Sorry.

bradyt commented 3 years ago

I am having trouble understanding via Gihub issue threads. Feel free to join one of the related community topical chat channels, such as via Matrix or IRC, myself or someone else should be around to discuss the idea further.

cauerego commented 3 years ago

i think i tried to join the channels... problem is both irc and matrix are terrible on android. or i, at least, couldn't find a solution yet.

how about telegram? it's not as evil as current GitHub, you know... 😁

bradyt commented 3 years ago

Did you try Element app for Matrix?

Looks like Element can be found on Play Store, F-Droid, and even as an APK at their Github releases page.

cauerego commented 3 years ago

yes, i did.

did you?

it's truly awful.

use it for long enough.