rndusr / stig

TUI and CLI for the BitTorrent client Transmission
GNU General Public License v3.0
554 stars 24 forks source link

Display torrents added recently by relative time measurement #227

Closed Soundtoxin closed 1 year ago

Soundtoxin commented 1 year ago

I can't tell if this is possible yet or not, so looking for help or if it's not possible, then it can be a feature request. For example I want to be able to open a new tab listing torrents that were added in the last day or week (7 days) to see what I grabbed recently without too must distraction. I'm thinking like the sleep command or find command can take, like 1h for 1 hour or 1d for 1 day. I started out with :tab ls added but I can't figure out how this works, and I think added might not be what I want anyway if it takes an exact date as argument. I saw in stig help filters that it takes a time value, but I'm not sure what a valid input would be. Could I see everything this month (2022-11) for example? I do actually already keep a tab where I list all torrents in the order they were added with the newest at the top, but I thought a less cluttered view would be nice to have as well.

Also, I tried stig help filters added and that didn't work (or rather it fell back to just the filters output). Is there somewhere I'm missing that would have more info on specific filters and how to use them?

Sidenote: I would've asked this on IRC or something if that were a choice. Does stig have an IRC channel anywhere?

Thank you as always for making stig and working on it, I use it every day.

rndusr commented 1 year ago

I tried to explain this in the "filtersmanual" help topic:

stig help filtersmanual

It's near the end. Let me know if this leaves you with questions.

No, stig doesn't have an IRC channel. (At least not that I know of.)

Soundtoxin commented 1 year ago

I'm not having much luck figuring this out. Why does :tab ls added < 1d ago not work? It seems similar to the example of completed > 1h ago

rndusr commented 1 year ago

Almost. Every argument to ls is a filter. So ls added < 1d ago interprets added, <, 1d and ago as individual filters, like ls apples oranges would.

To turn added < 1d ago into a single argument, you have to quote it.

ls "added < 1d ago"
Soundtoxin commented 1 year ago

Awesome! Works as I wanted after that. Thank you for clearing that up. I will close the issue now.