remember last run | specify from-date
steadfasterX opened this issue · comments
an amazing peace of code - thanks! there is an AUR package with the same name but I like yours more because of the options.
it would be a great enhancement if archnews could remember the last time it was run and then show new messages only.
Another approach which does not uses a remember option would be to use a from-date as a argument. This way one could say: show me all news since yesterday
archnews --since-date 2017-04-21
Either of one would be enough for my needs but I do not want to hold you back if you want to add both ;)
Note:
I want to use archnews in a cron and then send me periodically it's output so I can adjust the date while executing without a problem.
Thank you!
Yes, I will try to implement the "show me unread messages" behaviour, somebody in Arch forum though about it too. Stay tuned ;)
cool 👍 thx!
I pushed version with --unread
option and also --since
option, check them out. I still have some TODOs in code but it should work pretty OK as it is now.
Great dude! thanks!
--since
works totally fine for me
--unread
works fine but there's one issue I had:
When I choose to not mark as read:
Mark messages as read? [y/N]: N
-> When I then exec archnews again it will show
No news to display.
and the file ~/.config/archnews
gets written nevertheless. Deleting it will fix it until the next usage of course.
So the "do not mark as read" option doesn't work but all the rest seems to be fine :)
--since
works totally fine for me
Update:
I cannot combine --since
and --unread
with --grep
? This would be great to have..
Yes, you can combine them, but as is written in help, order is given:
Filters are executed in following order: `-u`, `-s`, `-g` and `-n` (`-n` is last) and can be combined.
I would like to apply these filters in order they are set on cmd line, but argparse library does not provide that information and I still haven't found a solution I would be happy with :))
I think I won't implement custom order. It is too tricky to get arguments order from the argparse library. Is the default ordering satisfactory for you?
works! thx and I'm totally fine with a fixed order if it is to complicated
MANY thx for adding the --no | --yes options !!! 👍
Awesome, I am glad it works for you!