#1
|
|||
|
|||
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 ;-) |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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 ;-) |
#4
|
||||
|
||||
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
__________________
JD-Dev & Server-Admin |
#5
|
|||
|
|||
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" |
#6
|
||||
|
||||
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"
__________________
JD-Dev & Server-Admin |
#7
|
|||
|
|||
"..." ::: "..." 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 |
#8
|
||||
|
||||
I'm sorry but I dont see any difference between
Code:
"desired file name" ::: "link" Code:
link#name=desired file name
__________________
JD-Dev & Server-Admin |
#9
|
|||
|
|||
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 |
#10
|
||||
|
||||
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 |
#11
|
|||
|
|||
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 |
#12
|
||||
|
||||
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 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 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. |
#13
|
|||
|
|||
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. |
#14
|
||||
|
||||
like you said earlier you do this yourself, based on what ever data or naming scheme you want.
Quote:
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#15
|
|||
|
|||
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 ;-) |
#16
|
||||
|
||||
@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 |
#17
|
||||
|
||||
Quote:
WRONG: it doesn't matter what name JDownloader will give the link. YOU SPECIFY the name of the link
__________________
JD-Dev & Server-Admin |
#18
|
|||
|
|||
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 ? |
#19
|
||||
|
||||
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. :] |
#20
|
|||
|
|||
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 ;-) |
#21
|
||||
|
||||
I give up, going in circles.
JD already supports the feature you want, you need to format it yourself before (as stated numerous times) adding the link to clipboard or JD via other means (apis). It will adopt the filename you want via that means. Do this via external program or manually yourself. thread closed raztoki
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#22
|
||||
|
||||
Quote:
It works perfectly fine. And does exactly what you want. You add an link in format url#name=xy and JDOwnloader will assign xy to that url. The exact same as adding url and then assign xy via any manual provided file. In both cases you have to edit a file/provide the filenames
__________________
JD-Dev & Server-Admin |
#23
|
|||
|
|||
Hello
Yes, i tried it and thank you very much, it works well I take advantage that you reopened the topic to apologize :-/ I did not understand what you were explaining to me Sorry for making you waste your time Thanks again |
#24
|
||||
|
||||
Thanks for the feedback! Please know that you can do so much more that way. You could also assign priority, different folder, packagenames ....
You did not *waste* our time when you finally got it working!
__________________
JD-Dev & Server-Admin |
#25
|
|||
|
|||
Thanks a lot :-)
Mgpai taught me a lot for that and more ! You talk about wildcards, it's actually very practical, but you also talk about priorities, how do you do with this technique ? |
#26
|
||||
|
||||
Better tell us what you want to achieve and we answer how/if it can be done
__________________
JD-Dev & Server-Admin |
#27
|
|||
|
|||
Nothing special, it's just to learn
In general I understood how to do but to manage the priority via this technical I would like to know ;-) |
#28
|
||||
|
||||
You could add additional information in URL for example
#priority=HIGH&name=name then you can check for sourceURLs contains #priority=HIGH In that case you've got to update the existing rule for name parsing as well. You can do a lot, too many to provide examples for all of them
__________________
JD-Dev & Server-Admin |
#29
|
|||
|
|||
Ok thank you
No problem, I just wanted an example for this particular case ... Is there a tutorial or a list of these cases? Last edited by Mistery; 11.12.2017 at 17:16. Reason: add a question |
#30
|
|||
|
|||
Quote:
I try here and works with one rule, i try with two, and dont works, like this **External links are only visible to Support Staff****External links are only visible to Support Staff** Code:
PakageName contains .*#pkg=() enable regex checkbox SourceURL contains .*#name=(.+) enable regex checkbox then set Download Directory <jd:packagename> filename to <jd:source:1> Anyone can help me? |
#31
|
||||
|
||||
Works fine for me! You've got to enable the regex checkbox!
Please show screenshot of your rule
__________________
JD-Dev & Server-Admin |
#32
|
|||
|
|||
Two rules at the same time in same link (packagename/folder and filename)
Quote:
**External links are only visible to Support Staff****External links are only visible to Support Staff** I want the package name be "SubjX" and the filename be "class 06 - When.mp4" And in another link example: **External links are only visible to Support Staff****External links are only visible to Support Staff** I want the package name be "Auql" and the filename be "class 07 - Who.mp4" So I try many ways use two rules at the same time in the same link, see the prints attached. **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** Thanks in advanced Last edited by Program; 24.01.2018 at 20:09. |
#33
|
||||
|
||||
sourceURL contains, enable regex
Code:
.*#pkg=(.*?)#name=(.+)
__________________
JD-Dev & Server-Admin |
#34
|
|||
|
|||
Two rules at same time works
Dear Jiaz,
All works ok now! Thanks! If another users want try, just do this: after the link put: #pkg=asdf#name=fdsa.mp4 In Jdownloader, put the suggestion of Jiaz: Sourceurl's contains: .*#pkg=(.*?)#name=(.+) enable checkbox. in ...then set package name: <jd:source:1> in ...then set Filename: <jd:source:2> |
#35
|
||||
|
||||
You're welcome!
__________________
JD-Dev & Server-Admin |
#36
|
|||
|
|||
Hello
i have a little problem: if i scan this, example url **External links are only visible to Support Staff****External links are only visible to Support Staff** work fine but if i scan (with name rule...) **External links are only visible to Support Staff****External links are only visible to Support Staff** don't work Can you help me please ? |
#37
|
||||
|
||||
will be fixed with next update
__________________
JD-Dev & Server-Admin |
#38
|
|||
|
|||
Thank you !
|
#39
|
||||
|
||||
You're welcome
__________________
JD-Dev & Server-Admin |
#40
|
|||
|
|||
Quote:
With #name=A 'B, C.jpg, the file is renamed to A 'B, C.jpg With #name=A 'B', C.jpg, the file is renamed to A 'B i.e. it cuts off the file name when `'` is followed by `)` or `,` and a space but not by `B`. Many files that I want to download are affected. How can this be fixed? A complete solution would be great, without having to tediously analyze by trial and error which other character combinations apart from `', ` and `') ` are problematic. Edit: Same problem when the file names are like that on the server (without renaming via the Packagizer Rule). For example: **External links are only visible to Support Staff****External links are only visible to Support Staff** 'B, C.jpg is grabbed as A 'B, C.jpg **External links are only visible to Support Staff****External links are only visible to Support Staff** 'B', C.jpg is grabbed as A 'B Last edited by SMS; 15.01.2021 at 13:40. |
Thread Tools | |
Display Modes | |
|
|