stashapp / CommunityScripts

This is a public repository containing plugin and utility scripts created by the Stash Community.
https://docs.stashapp.cc/add-ons/
GNU Affero General Public License v3.0
189 stars 147 forks source link

[Feature] Accept additional date formats #412

Open holly-hacker opened 3 years ago

holly-hacker commented 3 years ago

Is your feature request related to a problem? Please describe. I often manually tag content by copying data from a web page. For one of my sources the date format is YYYY/MM/DD (eg. 2021/10/25) and it gets rejected since stash only accepts dates that in the format YYYY-MM-DD. I have to change the slashes to dashes and this is somewhat annoying.

Describe the solution you'd like Accept more date formats, such as YYYY/MM/DD. I can't currently think of other date formats, except perhaps RFC3339 (eg. 2021-04-12T23:20:50.52Z).

Describe alternatives you've considered none

Additional context none

peolic commented 3 years ago

I often manually tag content by copying data from a web page.

Why not use/write a scraper? If you used a scraper, it could parse the date from YYYY/MM/DD for you.

holly-hacker commented 3 years ago

The platform I use doesn't have a scraper and you can't look for files by their file name anyway so that's not an option (it is similar to patreon). I may write a plugin for it in the future though, if that's possible.

stg-annon commented 3 years ago

well, it is possible to look up files by name, It's explicitly a feature in scrapers.

You could write a scraper that uses your auth for this paywalled content either byName or fragment should work for this, alternatively if you are content with copy/paste, write a userscript to change the dates on the origin site.

holly-hacker commented 3 years ago

I mean that the website I use does not allow searching by file name. If I end up writing a plugin, I can do the research on what I can or can't do but for now I just want to see the ability to enter different date formats.

stg-annon commented 3 years ago

the problem here is you would somehow have to be able to magically know the format you are receiving if you accept multiple, for example how would stash know that the user entered 12-11-2021 vs 11-12-2021 both of these are the same date in different formats so how is stash to know which to pick accepting a single standard makes it so there is no confusion here,

holly-hacker commented 3 years ago

I understand that there is ambiguity when working with MM/DD/YYYY and DD/MM/YYYY, but that's not what I'm asking. I only want both YYYY/MM/DD and YYYY-MM-DD to be accepted (ie. the separator character can be both / and -).

Maista6969 commented 10 months ago

Safe to close as this could be solved by a userscript or a UI plugin