iridakos / stup

Daily notes in the terminal :penguin:
https://github.com/iridakos/stup
MIT License
415 stars 31 forks source link

60 show notes of last x days #62

Closed ioanniswd closed 3 years ago

ioanniswd commented 3 years ago

Closes #60

ioanniswd commented 3 years ago

@tiosgz

IIRC, there’s some difference between how log & show display the notes, so the internal usage of show also doesn’t seem appropriate to me.

You are not wrong about this. It would require some re-writing though. Thinking about it.

I imagine it could be a wrapper for setting --from and --to for log, though that would require more thought (e.g. imagine stup log --from 2021-10-02 --days 14).

This option has a slightly different behavior than options from and to. It find the last X days where notes actually exist. I think it might be a little confusing when used with from/to

ghost commented 3 years ago

This option has a slightly different behavior than options from and to. It find the last X days where notes actually exist. I think it might be a little confusing when used with from/to

It was just an idea, so again feel free to ignore this. But it doesn’t seem confusing to me:

ioanniswd commented 3 years ago

@tiosgz I am convinced. Nice! 1111eae 87736f7

ioanniswd commented 3 years ago

IIRC, there’s some difference between how log & show display the notes, so the internal usage of show also doesn’t seem appropriate to me.

You are not wrong about this. It would require some re-writing though. Thinking about it.

I have a couple of ideas about this. Working on it.

Feel free to resolve any conversations if you find the fix ok.

ioanniswd commented 3 years ago

Looking at function execute_log more closely, I realized that I simply needed a way to calculate the dates with the notes I need to return. Will probably squash in a rebase, no reason to refactor in the same PR. a26f66c

@tiosgz Let me know when you are ok with a rebase and a force push.

ghost commented 3 years ago

Feel free to resolve any conversations if you find the fix ok.

Sorry, but the buttons aren’t there for me (idk how that happened). You can consider everything resolved as long as i don’t reply to it.

Let me know when you are ok with a rebase and a force push.

Don’t let yourself get limited with this, the commits are still accessible (force-pushed contains a link to the force-push diff, the old & new commits link to… the commits).

ioanniswd commented 3 years ago

Thank you for your help! :)