JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 07.04.2018, 22:12
YenForYang YenForYang is offline
Junior Loader
 
Join Date: Dec 2017
Posts: 10
Question Where can I find a comprehensive list and description of the "dynamic variables"?

That is, the ones that begin with "<jd:"...

The ones directly usable through the UI in JDownloader include orgfilename, orgfiletype, simpledate, orgpackagename, packagename, etc.

I've looked through PackagizerController.java in the source and it should have them all (I guess?) but I'm having trouble figuring out everything and what each one does.

For example, what are these (I think they exist?): append, env, hoster, source, indexof, subfolderbyplugin, orgfilenamewithoutext, prop. How do I use these and what do they do--(orgfilenamewithoutext is self-explanatory, I know)?. There are probably others I've missed (and I am certainly not sure how to use them). A reference/guide would be REALLY helpful


EDIT: Figured out append - it just allows you to tack on additional text to the result of the previous rule(s) (right?)

Last edited by YenForYang; 07.04.2018 at 22:50.
Reply With Quote
  #2  
Old 10.04.2018, 11:50
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

I just took a quick look at the source and here are those I could find.

<jd:append>
-> this placeholder will be replaced by previous value where the placeholder is being used in

<jd:prop:KEY>
-> this placeholder reads out an internal property of the downloadlink itself. properties are plugin specific and there are plans that plugins can return a list of supported properties that can be used here

<jd:indexof>
-> this placeholder will be replaced by number of index of the downloadlink within its package. first link will be 1, second link will be 2 and so on. It's just the index within the package!
-> will be replaced in real time

<jd:subfolderbyplugin>
-> some plugins support recursive folder support. if supported by plugin, then the downloads will have same directory structure like shown in browser

<jd:env:KEY>
-> this placeholder will be replaced by KEY environment variable of your system
-> will be replaced in real time

<jd:orgfilename> <jd:orgfilename:number>
-> this placeholder will be replaced by original filename or matching group(number) of filename pattern

<jd:packagename>
-> this placeholder will be replaced by the current package name
-> will be replaced in real time

<jd:orgfiletype> <jd:orgfiletype:Pattern>
-> this placeholder will be replaced by the file extension of the file or the match of the given pattern

<jd:orgfilenamewithoutext>
-> this placeholder will be replaced by original filename without file extension

<jd:hoster:number>
-> this placeholder will be replaced by the matching group(number) of downloadurl pattern or the host itself if number is -1

<jd:source:(number)pattern>
-> this placeholder will be replaced by the match of sourceurl pattern. with number you can specify which sourceurl to process

<jd:simpledate:simpleDateFormatString>
-> this placeholder will be replaced by time formatted with simpleDateFormatString, see docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
-> will be replaced in real time

<jd:orgpackagename>
-> this placeholder will be replaced by the original package name
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 21.10.2019, 18:20
Coldblackice Coldblackice is offline
Baby Loader
 
Join Date: Sep 2019
Location: San Francisco
Posts: 8
Default

Jiaz, thanks for these. Is there a way to have part of the file's URL appended as part of the filename? For example, if there are a list of files such as:

http: //example.com/b01/picture.jpg
http: //example.com/b02/picture.jpg
http: //example.com/b03/picture.jpg

Is there a way to have the files auto-named like:

picture_b01.jpg
picture_b02.jpg
picture_b03.jpg

...? TIA
Reply With Quote
  #4  
Old 24.10.2019, 03:40
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,297
Default

sure, package customiser rule, gives you the flexibility to parse components of urls or access filenames derived from linkchecking results. the latter would work
Code:
<jd:orgfilenamewithoutext>_<jd:indexof><jd:orgfiletype>
and if you need to listen based on jd:source / sourceurl you can (incase the website has different header filename from url) url you would need to listen to (filename) component and (file extension) and construct it again with <jd:indexof> source and its indexes from jd:source
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 23:04.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.