hydrusnetwork / hydrus

A personal booru-style media tagger that can import files and tags from your hard drive and popular websites. Content can be shared with other users via user-run servers.
http://hydrusnetwork.github.io/hydrus/
Other
2.28k stars 147 forks source link

gugs can't contain slashes / for workarounds #969

Open CuddleBear92 opened 2 years ago

CuddleBear92 commented 2 years ago

Current GUG's does not respect slashes in its setup. I was thinking of having a more messy but singular gug for Kemono that covered all of the supported sites. But for that i need the slashes and do keep part of the url. Would really like a fix for this as it has workaround usecases.

An overwrite for this for the specific GUG might be wanted if this replacement is having a use. image

floogulinc commented 2 years ago

In this particular case just use /user/ as the separator and then input site user.

evanjs commented 2 years ago

Just came across this the other day and have been using space separators as a workaround.

Accepting multiple parameters or such aside, this is pretty fun to handle with e.g. 20 subscriptions where you can't simply paste the URL "blob" for the GUG in, as you have to split with spaces (in this case), etc.

e.g. /some/path/1 won't work, you have to enter some path 1.

hydrusnetwork commented 2 years ago

Sorry, this is not a bug but a feature request. At the moment, GUGs are univariate--only one search text variable is allowed. The search text is assumed to be a variable to be inserted into an URL, so it is URL encoded.

Perhaps GUGs supporting two or more variables will be supported in future, but for now I think your best bet would be to create n GUGs, one for 'patreon', one for 'subscribestar', and more for whatever other fixed strings might be in your 'site' component.

evanjs commented 2 years ago

... but for now I think your best bet would be to create n GUGs, one for 'patreon', one for 'subscribestar', and more for whatever other fixed strings might be in your 'site' component.

Minor nitpick: this isn't necessarily exclusive to "aggregate" sites; I've had several sites that use slashes in e.g. gallery paths, so I have to use the workaround to handle slashes within a single GUG, especially when more than one of the components are dynamic.

Either way, a feature request might be more appropriate, as you were saying.

bbappserver commented 2 years ago

Related issues https://github.com/hydrusnetwork/hydrus/issues/868 Apparently issue is also true in reverse confusingly https://github.com/CuddleBear92/Hydrus-Presets-and-Scripts/issues/98