Bionus / imgbrd-grabber

Very customizable imageboard/booru downloader with powerful filenaming features.
https://www.bionus.org/imgbrd-grabber/
Apache License 2.0
2.42k stars 212 forks source link

illegal/especial characters for windows filenames in tags names are not handled. #208

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Try to save any image with a not permited character (like ":", or "|") in 
its filename.

What is the expected output? What do you see instead?

Either the file won't save at all (with an error message box) or in the case of 
an "/", the filename will split in folder/filename.

What version of the product are you using? On what operating system?

3.2.7 - Windows 7.

Please provide any additional information below if necessary.

Error message for illegal character. in this case, ":"
---------------------------
Error
---------------------------
Erreur lors de la sauvegarde de l'image.
D:\_IMG\_GRrd\10.0.0.5:3000 344 fate\stay_night monochrome ribbons saber signed 
sword tagme thighhighs watermark weapon.jpg
---------------------------
OK   
---------------------------

Also, the tag "fate/stay_night" for example; when chosing "save as", it is 
properly replaced with an "_". but when saving normaly or "get all",
it will be used as folder separator instead. although its meaningfull to have 
an "\" on the filename, so as to add images on separated folders, its certanly 
not desired if its in the tag name itself.

As for the ":" in the website name, i could handle it with javascript, but it 
may be usefull to be able to chose a name for the website when adding it, 
instead of using the site url. 

Original issue reported on code.google.com by android....@gmail.com on 17 Mar 2013 at 1:59

GoogleCodeExporter commented 9 years ago
I guess you are using the javascript filenaming?
If that is the case, it seems indeed that javascript variables are not 
pre-treated, unlike when using the tokens system (i.e. %copyright% will contain 
"fate_stay_night" while the javascript variable "fate/stay_night").

I'll fix this in the next version (which should be mainly bugfixes), thanks for 
letting me now!

I'll also add an option to choose the website name, as well as a new token to 
represent it (%website% would be the url, and something like %websitename% the 
name). You'll find it in the options of the booru (accessible from the sources 
window).

Original comment by bio.nus@hotmail.fr on 17 Mar 2013 at 1:59

GoogleCodeExporter commented 9 years ago
Yes, im using javascript naming. i've worked around the "10.0.0.5:3000" by 
specifically cheking for it and returnig a diferent name, but an website name 
variable would be the best. Looking forward for the next release. Ty for the 
great job with grabber, it rocks.

Original comment by android....@gmail.com on 18 Mar 2013 at 2:17

GoogleCodeExporter commented 9 years ago
Javascript now uses the same values as normal replacement, so they are also 
pre-treated.

%websitename% was added long ago, you can set your website's name in its source 
options.

Original comment by bio.nus@hotmail.fr on 2 Dec 2014 at 11:38