shreddit icon indicating copy to clipboard operation
shreddit copied to clipboard

[request] - Relative time for --before

Open 0xAnansi opened this issue 2 years ago • 1 comments

When configuring shreddit, a date must be entered in a "correct" format for it to work.

Enabling a relative time format would make it far simpler for a user to run, enabling commands such as shreddit --before "1month" removing anything older than a month.

0xAnansi avatar Jul 05 '23 12:07 0xAnansi

At the very least, allowing the ability to specify a date only. I am assuming it wants a full date time string?

e.g. shreddit --before 2024-08-14

haydenk avatar Aug 14 '24 18:08 haydenk

Did this ever get massaged in? Months/Days etc?

adam-rudd avatar Jan 21 '25 18:01 adam-rudd

When configuring shreddit, a date must be entered in a "correct" format for it to work.

Enabling a relative time format would make it far simpler for a user to run, enabling commands such as shreddit --before "1month" removing anything older than a month.

hi bro, did some debug. Trythis:

shreddit --username xxx --password xxx --client-id xxx --client-secret xxx --user-agent "xxx" --before="$(date -u --date="2 months ago" +"%Y-%m-%d %H:%M:%S") UTC"

adam-rudd avatar Jan 21 '25 19:01 adam-rudd

this has been added to the latest release! thanks again @BootsSiR

andrewbanchich avatar Mar 09 '25 15:03 andrewbanchich