Knowledgebase:
What is the Packagizer?
Posted by pspzockerscene psp, Last modified by pspzockerscene psp on 17 September 2021 03:21 PM

What is the Packagizer?

The packagizer is a feature which lets you modify parameters of given links & packages based on already given parameters.
It is most commonly used to modify filenames (e.g. remove parts of them) based on existing filenames or packagenames.
Many users are also using it to auto-set their download directory based on given filename & type.
You will find the Packagizer under Settings -> Packagizer

Note: Packagizer rules will only affect new added links! Nothing will change for existing links in downloadlist and LinkGrabber!

Overview

 


Simple example: Modify filename

The following rule will append "JDAwesome_" to all files from source "appwork.org" which are online.


URL used in this example: http://cdn8.appwork.org/speed.zip
Final filename of this example will be: JDAwesome_speed.zip" instead of "speed.zip".
You can test your Packagizer rules by utilizing the "Test" functionality on the bottom of your rule where a blue "play button" is located.

Please note that in order to to more complex filename/package name modifications, some knowledge about regular expressions is required.
Useful online tool to learn regular expressions: regexone.com
Useful online tool for testing regular expressions: regex101.com


Dynamic variables

In the above screenshot you can see some of the available dynamic variables which you can use as placeholders for your new custom filenames/packagenames.
You will find some of these in the context menu (screenshot) and a complete list here:

Name Explanation
<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 (e.g. Google Drive).
<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

Plugin specific properties (<jd:prop:KEY>)

These work the same as dynamic variables but are different depending on the website you're trying to download from.
Not all plugins provide such properties but here are some examples of which information those could provide: "uploader" (name of the uploader of content), "date" (date when content was published) and so on.
You can use such properties like this:

<jd:prop:PROPERTYID> e.g. <jd:prop:uploader> or <jd:prop:date>

You can use these properties the same way as <jd:orgfilename> is used in the above screenshot.
At this moment there is no nice user accessible plugin specific list of properties available as this is still on our TODO list.
In the meantime you can find plugin specific dynamic tags/properties in our support forum.


Import / Export Packagizer rules

On the bottom right corner, you will find two buttoms to import/export packagizer rules.
You can also export individual rules by selecting them --> Rightclick --> Export


Packagizer via myjd / headless mode

Myjd doesn't have any GUI for packagizer settings.
You can however, use a normale JD with GUI, add your packagizer settings and then simply copy them voa advanced settings to your headless JD.
See Settings --> Advanced Settings --> Search for PackagizerSettings
Packagizer rules will be exported as .packagizer files.


More Packagizer examples?!

You will find more examples for Packagizer rules in this help article category and also by searching for "Packagizer" (german = "Paketverwalter") in our support forum.

Depending on your needs, this Support Category will get updated to contain more useful examples in the future!



Attachments 
 
 packagizer_overview.png (95.03 KB)
 packagizer_example_modify_filenames.png (65.74 KB)
 packagizer_import_export.png (106.35 KB)
(6 vote(s))
Helpful
Not helpful