tagline: Uit openSUSE
|Dit artikel is nog maar gedeeltelijk vertaald. Als u mee wilt helpen met vertalen lees dan Wiki vertalen naar het Nederlands.|
For anyone that faced the same problem as me: how to transfer a big bunch of images / files? Matthew Ehle (the webmaster) has been so kind for us to create a new page: http://files.opensuse.org/opensuse/tmp/ . Solving the issue of the files being in random (not exactly, but enough to be confused) subdirs on the wiki. Also he enabled a nice multi upload extension on the new wiki. Giving us more freedom in transferring images.
Now, if you would transfer multiple articles at once, you will find Images missing. A red File:xxx.png for each image that is missing. Not surprisingly, because you didn't transfer them yet. The old work flow now is to chase them down one by one on the old wiki, download them one by one and upload them again one by one. These days are over!
New way: Download script
With our temporary structure it's getting real easy to fix your missing images. I used this script:
site=http://files.opensuse.org/opensuse/tmp/ list=$(grep ".." imglist.txt | while read file ; do img=$(echo $file | sed 's/ \+/_/g' | sed 's/^File://') echo $img done) download=$(for name in $list ; do echo -n "$site""$name" echo -n " " done) echo $download| cat > $PWD/check.txt wget -nv -nc -nd $download
This allows you to scroll through transfered articles, direcly copy-paste the red link into the text file imglist.txt. (including or excluding File: and spaces). When finished checking all those pages, execute the script: ét voila! All you missing images are being downloaded for you! Note that, if you use this exact script, the imglist.txt must be in the same directory as the script. Also all the files will be downloaded to the same directory!
You can use this script (under linux!) by copying to a textfile. Safe it under an easy name (eg getfile) and exit. In a shell you type:
chmod +x getfile
This makes it executable. To execute it type:
Multiple file upload
Wouldn't it be very convenient if you could upload all the downloaded files in one action as well?? Also this is possible now through a new page Special:MultipleUpload. Currently it's limited to 5 files at the time, which covers most of the articles that need to be transferred.