#1
|
|||
|
|||
Is there a way to always replace one character with another (package and filename)?
Sorry if this is a dumb question. I'm new to wanting to automatically rename things and it's hard to figure out how to even get started.
For example when I catch something with linkgrabber I always want 【 to instead be [, and 】to be ], in both package and filename. All of the time. What about longer things, like always shortening something like "Ch -EN" (case sensitive) to only "Ch" in package and filename? |
#2
|
||||
|
||||
Hi,
sure - here are your options: 1. Select multiple packages or files and press F2. or: 2. Another way if you want to automatically/permanently rename things: Packagizer rules Keep in mind Packagizer rules have a very limited functionality if you want to use them to do complex renaming stuff but for simple tasks, they should get the job done. or: 3. For advanced functionality, you could write one or multiple EventScripter Scripts. -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 12.02.2021 at 18:18. |
#3
|
|||
|
|||
Thanks! I figured out how to do most of the things I wanted in packagizer.
There's an exception I don't know how to get around. When a condition is met more than once, packagizer can't seem to find any of the matches except for the last one. I'll post an example. I put into "package contains" (and file name contains): "*【*】*" (minus quotes) In "then set" package name I put "<jd:orgpackagename:1>[<jd:orgpackagename:2>]<jd:orgpackagename:3>" and in filename I put "<jd:orgfilename:1>[<jd:orgfilename:2>]<jd:orgfilename:3>" That works if there's only one 【 and one 】. But if there's more than one of each, only the last 【 and 】get changed to [ and ]. Here's an example of something with multiple 【, and multiple 】: **External links are only visible to Support Staff****External links are only visible to Support Staff** What I was expecting in linkgrabber is "OtakMori Translations - VTubers_[Hololive]Ollie Tricked Marine into Marriage After Multiple Rejections[Phasmophobia][Eng Sub]" What actually shows up in linkgrabber is "OtakMori Translations - VTubers_【Hololive】Ollie Tricked Marine into Marriage After Multiple Rejections【Phasmophobia】[Eng Sub]" As you can see only the last 【 and 】 gets changed to [ and ]. How could this be fixed to have all 【 become [, and all 】 become ], regardless of how many there are? Last edited by plip; 13.02.2021 at 08:48. |
#4
|
||||
|
||||
package customiser wont work well for that since its fixed based on wildcards or regular expression pattern.
You will need to either create a rule for each possibility (duplicate rule && adjust) for say 2/3/4/5 brackets already in filename, or use the event scripter and javascript and you will be able to replace or look at the event scripter, but you will have similar limitations (simple regex/or string replace) without creating code for example search/find for how many groups brackets there are, and use a for loop based on this number and create a new string with the formatting you'd like
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
20.02.2021, 00:18 |
plip |
Message deleted by pspzockerscene.
Reason: Deleted on users' behalf
|
Thread Tools | |
Display Modes | |
|
|