Close
Mass Uploader
I'm seeking a mass uploader for danbouro, and that works on this site ^^ got quite a few things to post and do that manually will take days.

Does one exsist?
I'm using Curl atm, works pretty well so far (took me quite a bit to learn to use it though lol).
there was one java thingie a while back
no idea if it still works
Please don't flood the index.
syaoran-kun said:
I'm using Curl atm, works pretty well so far (took me quite a bit to learn to use it though lol).
admin2 gave me one to use a bit ago that I never got the chance to use or understand how it worked... >.<
sucky thing about curl, you need to have the files on your webspace/server...
oh didnt know
syntax the same ?
curl http://moe.imouto.org/post/create.xml -H "Expect:" -F 'login=name' -F 'password_hash=hash' -F 'post[tags]=moo' -F 'post[file]=@filename'
petopeto said:
curl http://moe.imouto.org/post/create.xml -H "Expect:" -F 'login=name' -F 'password_hash=hash' -F 'post[tags]=moo' -F 'post[file]=@filename'
for multiple instances i use

for i in 1.png 2.png 3.png 4.png etc; do curl http://moe.imouto.org/post/create.xml -H "Expect:" -F 'login=name' -F 'password_hash=hash' -F 'post[tags]=moo' -F 'post[file]=@[path to folder with images]'"$i"; done

You can add as many files as you want. Hope it heps.
Goes really well this.... NOT

<?xml version="1.0" encoding="UTF-8"?>
<response success="false" reason="access denied"/>

But yes, I know the hash is 'correct'.....

curl http://moe.imouto.org/post/create.xml -H "Expect:" -F 'login=MugiMugi' -F 'password_hash=(REMOVED)' -F 'post[tags]=TAGME BLADE pool:Zealotic_Blade_Zero' -F 'post[file]=C:\WORK\Upload\001.png'

Is there something else wrong here, or I maybe just don't have access to use this way of posting... bit annoying to post all this files manually thought.

Or is there an better way ot post this as you still need ot type every darn line of this.

Okay messed some more with it but just getting more and more errors, I just take it it's not even possibel to do this under win32 with the curl binary so pretty much pointless.

If I ever find a way I post the Blade artbook but for now, I don¨'t have time to manually post 100+ pages.
For the Windows shell, you need to use double quotes.

curl http://moe.imouto.org/post/create.xml -H "Expect:" -F "login=name" -F "password_hash=hash" -F "post[tags]=moo" -F "post[file]=@filename"

Don't forget the @ before the filename.

You can also do -F user[name]=name -F user[password]=password, to avoid having to look up your hash.

Set the rating, too; either add -F post[rating]=e, or the "rating:e" metatag.

You don't type this in for every file; make a script to do it, eg.

@echo off
curl http://moe.imouto.org/post/create.xml -H Expect: -F post[file]=@%1 -F post[tags]=%2 -F user[name]=user -F user[password]=pw

... and then just make a script where you can fill in the tags in advance:

@echo off
call upload.bat file01.jpg "tag1 tag2 rating:3"
call upload.bat file02.jpg "tag1 tag3 rating:3"
call upload.bat file03.jpg "tag1 tag4 rating:3"

(quotes around the filename too if it contains spaces)

Personally, I recommend spreading larger batches across several days. It gives people more a chance to look through them; if five pages of the index are the same pool, many people are going to gloss over a lot of them.
Didn't plan to upload them exactly at once either ^^ so don't worry, but didn't want to spend way to long time on posting it as it takes quite a while to upload PNG files ^^.

As for the pass hash thats easy to get reading it off the cookie :P
I've tried doing this with 2 bat files. And it seems to "work" as in, I get no errors, but it doesn't actually upload anything. Any ideas?

upload.bat
call upload-script.bat "Z:\Some where\file.jpg" "tag1 tag2"

upload-script.bat contains the what petopeto said above. Except I've replaced user with my username and pw with my password. As well as added "-k" as the 'booru I'm uploading to uses https and a self-signed cert.

curl https://someurl.com/post/create.xml -H Expect: -F post[file]=@%1 -F post[tags]=%2 -F user[name]=username -F user[password]=password -k

In a cmd window I enter upload.bat and it displays the lines in both bat files on seperate lines and nothing happens.

If I change things I get errors, but I can't get it to actually work.
Add -v to get more output. Check the Danbooru version; login fields and API support has been added to over time.
Verison is 1.15.0.

Hmm I keep getting an Internal Server Error. I wonder why.
You might need to add "-F post[source]=" for other danboorus (which I think have no default for that field).
Oh! Right, I remember that from the perl script. You had to enter a blank source for it to work. I'll give that a try.

Edit: that worked! Thank you!
An additional related question. Is there a way (in Windows) to auto-generate a list of files as well as automatically add "call upload-script.bat" and quotes to the path?

Currently how I do this is via a context menu I created that has "C:\Windows\filelisting.bat %1" in it.

Filelisting.bat has dir %1 /b /a:-d-h /o:n >> C:\Users\<Removed>\Desktop\Websites\scripts\curl\upload.bat

This creates just a list of the file names. I then use a macro in notepad++ to add the rest.

Is there a simpler way via some scripting? More of an all in one click solution. Where you only have to add tags afterwards.
ugh... speed totally sucks when uploading via curl/post method...

seems like throttled to ~1,x mbit /s ... which annoys if you have a 100mbit line...
Any reason that would be?

I've only got 1 Mbit up anyway. But I'd be curious to know.
Don't personally think there is a limit with that app, myself have 100Mbit but don't help to this site as I don't manage to upload more then 50-100 KB/s if I'm lucky anyway.
For some reason curl has stopped working for me. I haven't used it in a while, however I've changed nothing.

It fails to create formpost data.

Also, oddly, my directory listing script mentioned previously in this thread stopped working as well. I'm wondering if Vista has for some reason decided to ignore the variables like %1 and %2.

Any ideas?
Eruru said:
For some reason curl has stopped working for me. I haven't used it in a while, however I've changed nothing.

It fails to create formpost data.

Also, oddly, my directory listing script mentioned previously in this thread stopped working as well. I'm wondering if Vista has for some reason decided to ignore the variables like %1 and %2.

Any ideas?
Check the path to the images...every time i get a formpost data error it's because some word/path is missing somewhere in the line.
Does curl/command prompt not like certain characters? such as , [ ] ?
That must be it. I moved it to a directory without those characters and it worked.

Thanks for leading me in the right direction syaoran-kun.
syaoran-kun said:
for multiple instances i use

for i in 1.png 2.png 3.png 4.png etc; do curl http://moe.imouto.org/post/create.xml -H "Expect:" -F 'login=name' -F 'password_hash=hash' -F 'post[tags]=moo' -F 'post[file]=@[path to folder with images]'"$i"; done

You can add as many files as you want. Hope it heps.
I used this some time ago, worked. Now I keep getting
< HTTP/1.1 500 Internal Server Error