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

Javascript naming bugs #124

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 9 years ago

at least ^^ the first batch of bugs connected to that new great javascript naming tool!!

  1. as you must know, the automated javascript code given by grabber is filled with mistakes.
  2. using the corrected code you gave me, it work very nicelly, thanks ^^ but : if ever grabber crash, the security file restitute a bugged download sheet! (2 line per download job, javascript path and file name on a new line, seperated from the tag and pages informations)
  3. any tag with underscore ( _ ), keep the underscore. the 'replace underscore with space' does not work. (do we need to use a javascript command to do that replacement?).

PS : do you know any url where I could find usefull command for javascript.

thanks for all

Original issue reported on code.google.com by ser...@hotmail.com on 12 Jul 2012 at 8:57

GoogleCodeExporter commented 9 years ago

I hope that's the first and the last one, else that would mean that it's very bugged xP

as you must know, the automated javascript code given by grabber is filled with mistakes.

Well, I am only aware that if you have put text (anything but a token) at the the beginning or the end of your filename, you will have to add a "'" (single quote) at the beginning or the end of your filename (respectively). Are there other problems ? (I also know that the %date:format% is fucked up when converted to javascript, but it's normal, there's no way to do otherwise)

using the corrected code you gave me, it work very nicelly, thanks ^^

Yay :D

if ever grabber crash, the security file restitute a bugged download sheet! (2 line per download job, javascript path and file name on a new line, seperated from the tag and pages informations)

I see, that's problematic indeed. Do you have any line breaks in your Javascript filename ? (when using the syntax-colored editor)

any tag with underscore ( _ ), keep the underscore. the 'replace underscore with space' does not work. (do we need to use a javascript command to do that replacement?).

Underscores should normally still be replaced, according to your settings. A bug indeed. ^^ But until I upload an update, you can use the replace() command (for example, for characters: characters.replace('', ' '), which will replace all '' by ' ').

You can find all commands in Javascript documentations on the net, for example https://developer.mozilla.org/en/JavaScript/Reference/. But it's not very useful as-is seeing how many commands there are, unless you know exactly what you want, so Google usually remains the best solution ^^ (the Site du Zero's Javascript tutorial is not bad either)

Original comment by bio.nus@hotmail.fr on 12 Jul 2012 at 9:14

  • Changed state: Accepted
GoogleCodeExporter commented 9 years ago

up to now, those are the only bugs I found! you want more??? :P

about N°1 : it might not have been the good words. (pas facile de toujour trouver les bons mots en anglais :/ ). I should have said : "automated javascript code based on the Filename give a non working command" I am not good enough to know what is wrong with the given automated command line, I just saw it was not working.

Thanks for the javascript info/tips, I'll check about those.

Original comment by ser...@hotmail.com on 13 Jul 2012 at 2:31

GoogleCodeExporter commented 9 years ago

using the last version available 3.2.0

I tryed to add the "characters.replace('_', ' ')" command line, but I do not know how to corretcly connect it to the rest of the javascript command line, or is it even working? I get "referenceError: can't find variable: character"

(nb: I get 1 warning message for each images in the download batch .. that sometime make a lot of windows ...)

My command line is : javascript:search_1[0] + '\' + search_1 + '\' + website + '[' + artist + '] ' + id + ' (' + copyright + ' (' + character + ')).' + ext

Original comment by ser...@hotmail.com on 3 Aug 2012 at 7:28

GoogleCodeExporter commented 9 years ago

Ah, seems I forgot to fix this bug for the alpha version :X

By the way, there's no s to the "character" variable, that's why you have this error. You must juste replace "character" by "character.replace(...)" like that: javascript:javascript:search_1[0] + '\' + search1 + '\' + website + '[' + artist + '] ' + id + ' (' + copyright + ' (' + character.replace('', ' ') + ')).' + ext

And it works! (at least this... I just noticed a bug xD) I'll try release something to fix the "replace spaces by underscores" in javascript expressions (and fix the huge bug I just found).

Original comment by bio.nus@hotmail.fr on 4 Aug 2012 at 4:13

GoogleCodeExporter commented 9 years ago

no 'S' ...but I copy-pasted it :_(

btw, in this alpha version, did you saw that search/result tabs are anyways named 'new tab', whatever you searched.

one last thig, the safety system for crashes, sometime restore an error filled session (corrupted download batch, empty search tabs ...). I still not have understood how to reproduce this, but as soon I work it out, I'll post some info about it ... or maybe it will be fixed before I do ^^

also, rule34 boorus (both of them) do not always give all images, it seem some image are confused with others. again, no obvious logic to it. you try to dwonload a batch of 50 images : sometime, only 10 are downloaded, sometime, all of them. when you click on a thumbnail in the result windows, sometime you have another image in the windows, not the selected one. strange stuff!

ad, the gelbooru 'page 1 is 0' bug is not ficed either ^^;

thanks for grabber ;)

Original comment by ser...@hotmail.com on 4 Aug 2012 at 7:26