JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 28.11.2017, 19:00
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default Script to renaming

Let's imagine that i want the detect files to be named in a predefined way
for example, we would import a file containing this informations:
"desired file name" ::: "link"
etc.
and we would get this "name" for the file found via this "link" ...

Is there already a script for this ? Or so it should be ;-)
Reply With Quote
  #2  
Old 28.11.2017, 19:30
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,340
Default

You can use the packagizer and create rule that parses name from URL
similiar to this one
https://board.jdownloader.org/showpo...82&postcount=4

Feel free to ask if you have further questions about this
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 28.11.2017, 21:51
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

No, because I'm talking about giving each file a specific name
Name that would be totally independent of linkgrabber analyzes ...
(This would even give names to files / links not supported by jd2 ;-)
Reply With Quote
  #4  
Old 29.11.2017, 09:45
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,340
Default

Did you even try or read it?
Via packagizer you can do exactly that.
You simply append you *wish* name at the end of the url
Code:
url#name=Hello.zip
and use Packagizer rule to parse the given name and use it for filename
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 29.11.2017, 15:04
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

Sorry but if i understand correctly, "hello.zip" must be predefined and will be the same for all ?
I wish he could have no connection with anything and that supplants all the other rules...
ex.:
if i write in the file, for example "dadada" ::: "www .... com/hello.zip"
the result for all the files found for this link would be: "dadadahello.zip" or (depending on any settings) "dadada.zip" ...
and if another time i write in file "blablabla" ::: "www .... com/hello.zip"
the result for all the files found for this link would be: "blablablahello.zip" or (depending on any settings) "blablabla.zip" ...
etc.

So that every link written in the file, would integrate the name assigned to it manually, name that can be different for each of them and each time, since it depends on what is written in the file (even if they come all from the same site or not)

It would be a bit like a custom "linkcollectorList.zip"
Reply With Quote
  #6  
Old 29.11.2017, 15:34
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,340
Default

I'm sorry but I understood that you want to tell JDownloader for each url what filename to set
URL1#name=Test1.zip
URL2#name=Test2.zip

Of course this only works when URL1 results in one url. You can also use to append something to name.

But that is what you wrote
Code:
"desired file name" ::: "link"
I instead of name:link, it is link#name=name
__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 29.11.2017, 17:07
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

"..." ::: "..." is an example of possible syntax but that's you who decide ;-)
In any case it would be nice if one day you allow this possibility
It would also be very convenient to name videos when a site is not supported by JD
Reply With Quote
  #8  
Old 29.11.2017, 17:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,340
Default

I'm sorry but I dont see any difference between

Code:
"desired file name" ::: "link"
and
Code:
link#name=desired file name
same outcome, just different syntax.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #9  
Old 29.11.2017, 20:18
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

Yes, my syntax is just an example, the important thing is my proposal ;-)
But now i understand that my script/plugin proposal seems, at first sight, strange and useless
Reply With Quote
  #10  
Old 29.11.2017, 20:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,340
Default

I'm sorry but I still don't know what the problem is?
What you ask for is already possible.
Either you do it via Packagizer Rule or you write an Eventscripter script that loads the file and renames the existing links in list.

adding links with predefined names is no big deal
__________________
JD-Dev & Server-Admin
Reply With Quote
  #11  
Old 29.11.2017, 22:07
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

I admit that i do not see how to do this via the rules since it does not depend on any information obtained in the linkgrabber
And the script i do not know if i will be able to do it ... :-s
Reply With Quote
  #12  
Old 30.11.2017, 10:39
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,340
Default

Example link
Code:
https://board.jdownloader.org/Nothing.zip#name=Yeah.zip
https://board.jdownloader.org/Nothing2.zip#name=Yeah2.zip
https://board.jdownloader.org/Nothing3.zip#name=Yeah3.zip
instead of
Code:
Yeah.zip:::https://board.jdownloader.org/Nothing.zip
Yeah2.zip:::https://board.jdownloader.org/Nothing2.zip
Yeah3.zip:::https://board.jdownloader.org/Nothing3.zip
ALWAYS JUST ONE SINGLE RULE
Packagizer Rule
Code:
SourceURL contains
.*#name=(.+)
enable regex checkbox

then set
filename to <jd:source:1>
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 01.12.2017 at 10:54.
Reply With Quote
  #13  
Old 30.11.2017, 21:58
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

Ok but if the name we want to give is not in the links or anywhere else ... and we want to name each file individually, i really do not see how we could do it with this method :-s

Last edited by Mistery; 30.11.2017 at 23:13.
Reply With Quote
  #14  
Old 01.12.2017, 01:04
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,659
Default

like you said earlier you do this yourself, based on what ever data or naming scheme you want.
Quote:
if i write in the file, for example "dadada" ::: "www .... com/hello.zip"
just use the syntax and package customiser rule jiaz mentioned earlier and JD will parse for your custom name.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #15  
Old 01.12.2017, 10:21
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

There is no schema, the name is totally personalized.
If you make a rule you always have the same result and so there should be a rule for each file
(and do not forget the cases where jd does not support the link or there is no name in the url ...).
I speak of a kind of "linkgrabber.zip" but built manually ...
The script to get this file i can do it without problem, stay more than jd take it into account ;-)
Reply With Quote
  #16  
Old 01.12.2017, 10:54
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,340
Default

@mistery: you don't have to do a rule for each file!
the packagizer rule, see https://board.jdownloader.org/showpo...6&postcount=12
works for every file.
there is only ONE rule that works for ALL files
__________________
JD-Dev & Server-Admin
Reply With Quote
  #17  
Old 01.12.2017, 10:55
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,340
Default

Quote:
Originally Posted by Mistery View Post
If you make a rule you always have the same result and so there should be a rule for each file
WRONG: ONE RULE for all

Quote:
Originally Posted by Mistery View Post
(and do not forget the cases where jd does not support the link or there is no name in the url ...)
WRONG: it doesn't matter what name JDownloader will give the link. YOU SPECIFY the name of the link
__________________
JD-Dev & Server-Admin
Reply With Quote
  #18  
Old 01.12.2017, 21:27
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

I do not think we understand each other well :-/

If we want to give a personalized name and that does not correspond to any information that can be used.
Here is a fictional example (links not supported by jd2, which will not give him an intelligible name and whose (s) does not contain info):
"blablabla" ::: "www...com/5236lbfjkj2355.mp4"
"dada" ::: "www...com/kutfsssdg45745.mp4"
etc.
etc.
etc.

How to do this with a rule ?
Reply With Quote
  #19  
Old 02.12.2017, 12:30
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,659
Default

same as stated earlier
you will need to know the naming scheme yourself PRIOR to adding the link in the format that Jiaz mentioned and that I said earlier. If the content is not supported by JDownloader or hasn't a support file extension you can use prefix "direct**External links are only visible to Support Staff**. This will tell the JD and the DirectHTTP plugin that the content is direct downloadable...

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #20  
Old 02.12.2017, 20:37
Mistery Mistery is offline
JD VIP
 
Join Date: Aug 2015
Posts: 344
Default

Thank you for the info of the direct link i will try it for some cases.
But here, as i said, there is no schema since the names are specified case by case.
That's why i propose to create a special file containing the names that must be assigned to the files found.
This is even more for when the links are not supported by jd2 and therefore without a real name ;-)
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 10:32.
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 - 2024, Jelsoft Enterprises Ltd.