JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 20.06.2021, 00:19
snuffleupagus snuffleupagus is offline
DSL Light User
 
Join Date: Feb 2020
Posts: 32
Default Append Specified text to Downloaded file

Is this possible? I was trying to see if I could do this

Have a file with a URL + Desired Append Text.

- use jdownloader to

- download the file with the URL
- append the Desired text to the file.

File
URL + Dog
URL + Cat

Result
Downloaded File Filename + Dog.<ext>
Downloaded File Filename + Cat.<ext>

Thanks
Reply With Quote
  #2  
Old 20.06.2021, 04:29
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,372
Default

and how do you determine its a cat or a dog? if it has some logical identifiers you can use settings > package customiser and do that quite easily
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #3  
Old 20.06.2021, 07:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,334
Default

Quote:
Originally Posted by snuffleupagus View Post
- append the Desired text to the file.
Append the desired text to the url using an identifier string.

Code:
url#mytext=dog

Create a packagizer rule to insert it in the filename:
Code:
if -> sourceurl(s) -> contains : #mytext=*
then set -> Filename : <jd:orgfilenamewithoutext> - <jd:source:1>.<jd:orgfiletype>
Reply With Quote
  #4  
Old 20.06.2021, 09:21
snuffleupagus snuffleupagus is offline
DSL Light User
 
Join Date: Feb 2020
Posts: 32
Default

Quote:
Originally Posted by raztoki View Post
and how do you determine its a cat or a dog? if it has some logical identifiers you can use settings > package customiser and do that quite easily
I have to manually specify it myself. There is nothing I can take from the actual URL itself.
Reply With Quote
  #5  
Old 20.06.2021, 09:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

see
https://support.jdownloader.org/Know...the-packagizer
https://support.jdownloader.org/Know...ame-via-anchor
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 20.06.2021, 10:12
snuffleupagus snuffleupagus is offline
DSL Light User
 
Join Date: Feb 2020
Posts: 32
Default

So an example is **External links are only visible to Support Staff****External links are only visible to Support Staff**

using jdownloader I get:
Code:
2021-06-12_@khaby.lame_6972918015830576390.mp4
using:
Code:
if -> sourceurl(s) -> contains : #mytext=*
then set -> Filename : <jd:orgfilenamewithoutext> - <jd:source:1>.<jd:orgfiletype>
with the appended mytext **External links are only visible to Support Staff****External links are only visible to Support Staff**
with the packagizer rule I get:
Code:
_@khaby.lame_6972918015830576390 - cherry.mp4
the desire is:
Code:
2021-06-12_@khaby.lame_6972918015830576390 - cherry.mp4
What do I need to do to modify the rule to keep everything in front of the @?

thanks for all the help. greatly appreciated.

Last edited by snuffleupagus; 20.06.2021 at 10:29.
Reply With Quote
  #7  
Old 20.06.2021, 10:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

@snuffleupagus: the date is only available after linkcheck, so you have to disable Settings->Plugins->tiktok -> "Enable fast linkcheck"
The name set by your rule has higher priority than the one set by plugin, so without linkcheck (fast linkcheck enabled) the date will be parsed after the packagizer name is already set and no longer available to the rule. you have to disable the fast linkcheck in order to have the full name available at the time the rule is processed
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 20.06.2021, 11:36
snuffleupagus snuffleupagus is offline
DSL Light User
 
Join Date: Feb 2020
Posts: 32
Default

great! that did it! thank you
Reply With Quote
  #9  
Old 20.06.2021, 13:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

You're welcome!
__________________
JD-Dev & Server-Admin
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 02:33.
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 - 2021, Jelsoft Enterprises Ltd.