Kilian Kluge wrote:
> There is a problem with the german umlaut ß (all the others, ä, ö and ü,
> work), the pictures aren't downloaded. I don't have the time to look
> into that now, so I keep downloading all the others and will try to find
> a solution tomorrow (and then download the ß-ones).
>
> So if your language has some special characters that are accepted on
> commons and widely used (unfortunately, the german word for street is
> Straße ;) ) you should test that first. Once I have a workaround, I'll
> let you know.

I don't even know how your script can work.
You get a list of images (eg. "Foo.jpg Bar.jpg") and then you call wget 
with that. wget expects urls, not filenames.
I suspect your ß problems are related to encodings. You are calling wget 
without even quoting it (you would also need to escape the quote 
characters, but that's an improvement). I think you will have problems 
with &, ' and ". Also, you are executing that in the shell, seems you 
have a command injection vulnerability. I hope nobody called his file 
Monument`rm -rf /`.JPG :)
Calling wget each time instead is a bit unefficient, I would recommend 
using wget -i if you can.

Now, here is a little recipe in shell script, assumes a UNIX shell, such 
as bash (provided with GNU/Linux distributions, cygwin...).

Let's suppose you have a list of urls separated by spaces in komplett.txt.
We want it as one url per line, so we do:
 > sed 's/ /\n/g' komplett.txt > in-lines.txt

We now split the list with one eigth per jury (replace 8 with the number 
of your juries)
 > for i in $(seq 1 8); do sed -n "$i~8p" > jury$i.txt; done

That gives us files jury1.txt, jury2.txt... jury8.txt

Move each of them to its own folder:
> for i in $(seq 1 8); do mkdir "Files-jury-$i" ; mv jury$i.txt 
> "Files-jury-$i"; done

And for each of them, run
 > wget -i jury1.txt
(change the number accordingly to the folder)

Move each folder to a different usb drive, you're done.


_______________________________________________
Wiki Loves Monuments mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikilovesmonuments
http://www.wikilovesmonuments.eu

Reply via email to