[Userscript] semi-Automated Derpibooru Uploader

Started by St@SyaN
Posted
19 replies
Login to subscribe to responses
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
Started as thing to allow "sharing" to Derpibooru from 3rd party sites, this script grown up and now heavily reworks uploading process:

*. As mentioned, can be integrated with external sites to simplify uploading process (more info below);
*. Notifies about possible typos (adding nonexistent tag or tag with 0 images);
*. Notifies about hitting DNP;
*. Resolves aliases;
*. Displays implications (more info here).

It also provides simple API, allows to automatically prepare almost everything before uploading by using individual userscripts.

Please notice, that you should have installed Tampermonkey or Greasemonkey plugin for using!

Core userscript

Tumblr userscript
DeviantArt userscript
YCH.Commishes userscript

Needed (in rough priority order (you may write your own tool!)):
*. e621/e926
*. FurAffinity
*. Inkbunny
*. Pixiv

Url API

$Demo
Suggestive screenshots, because similar images search have been made rough (sometimes it misses almost identical images with default value). Clickable.


I have typed nothing, only few clicks.

——

Tumblr userscript screenshots:



As you can see, "DB upload" button appears not only at dashboard but even in personal blogs (tries, at least)

——

DevianArt userscript screenshot



——

YCH.Commishes screenshots



St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
Script executes, when upload page has some parameters in URL. All of them are not necessary. All not numeric parameters should be URI encoded (encodeURIComponent).

newImg — link to uploading image
src — source link
tags — list of tags separated by , which will be inserted automatically
description — description
origin — numeric id of pre-selected "similar" image
originView — link to "similar" image itself
originWidth — width of "similar" image
originHeight — as previous
newWidth — width of new image. Use if Derpibooru fetchs preview image smaller than actual to display sizes correctly
newHeight — as previous

Selecting image from list of similar is equivalent to setting origin parameter.
If origin parameter exists or changes, script fetchs: originView (large view url), originWidth, originHeight, tags (adds to defined in URL) and src (only if wasn’t provided in URL)

Examples:
/images/new?tags=3d, artist:thevioletghost, looking at you, queen chrysalis, safe, solo, source filmmaker&src=//thevioletghost.tumblr.com/post/156087120675/here-has-a-bugg-queen-butt-cause-bugs&origin=1670513&originView=//derpicdn.net/img/2018/3/3/1670513/large.jpeg&originWidth=4000&originHeight=2250

/images/new?newImg=//s3.amazonaws.com/data.tumblr.com/76a578e66c050fb9368c1ac1026a4676/tumblr_moamaxd8a81r7jepho1_raw.jpg&src=//tsitra360.tumblr.com/post/52804598555/quick-30-minute-drawing-practicing-styles-and&tags=artist:tsitra360&description=example text

/images/new?newImg=//orig00.deviantart.net/e747/f/2016/170/9/a/celestial_valkyrie_by_mysticalpha-da5fznj.jpg&src=//mysticalpha.deviantart.com/art/Celestial-Valkyrie-613805887&tags=artist%3Amysticalpha&description=[bq]Dat hair patreon.com/mysticalpha[/bq]&newWidth=2560&newHeight=1600
patec's avatar
Posts: 751
patec
The End wasn't The End - Found a new home after the great exodus of 2012
Fine Arts - Two hundred uploads with a score of over a hundred (Safe/Suggestive)
Magnificent Metadata Maniac - #1 Assistant
Not a Llama - Happy April Fools Day!
Cool Crow - "Caw!" An awesome tagger
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)

Site Moderator
I installed this script and today I noticed a "upload copy" button in the "tags and source"-tab.
Is that a button for testing?
Cause I can’t imagine any situation when that would be a useful feature.
Posted Report
The Smiling Pony's avatar
Posts: 7774
The Smiling Pony
The 1% - Uploaded 1% or more of the site's images
A Perfectly Normal Pony - <TheSmilingPony> the point of these mystery badges is to be mysterious
Artist - (in quotation marks)
An Artist Who Rocks
A Really Classy Artist
Fine Arts - Two hundred uploads with a score of over a hundred (Safe/Suggestive)
Perfect Pony Plot Provider - 10+ uploads with over 350 upvotes or more (Questionable/Explicit)
Magnificent Metadata Maniac - #1 Assistant
Best Artist - Providing quality, Derpibooru-exclusive artwork
Friendship, Art, and Magic (5 Years) - Celebrated Derpibooru's five year anniversary with friends.
Cool Crow - "Caw!" An awesome tagger
Friendship, Art, and Magic (6 Years) - Celebrated Derpibooru's six year anniversary with friends.
Condensed Milk - State-Approved Compensation
Friendship, Art, and Magic (7 Years) - Celebrated Derpibooru's seventh year anniversary with friends.
Toola Roola - For helping others attend the 2019 Community Collab

✨Draw more Fleetfoot✨
@patec
It goes to the upload page and populates the tags and source with those of the chosen image; I figure it can be useful if you’re uploading an image that has alternate versions, or that are different characters in the same theme. I just use the browser Back button for that, and the site already has tag-mass copy implemented, but ¯\(ツ)
Posted Report
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
@patec
@The Smiling Pony
Initially it was for testing, but it can be used to uploading updated/alternated/edited version when browser caches doesn’t help (since it’s not only copies tags but also source and description (probably, not sure) and checking for similarity.
Posted Report
Background Pony #6204
Could e621 have a userscript made for it too? That would cover the big 3 places for uploading pony art :D
Posted Report
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
Many updates
Core:
– reverse search doesn’t start until you click "check";
– it also works with local files;
– parameters newWidth and newHeight;
– description cleans up from whitespace chars.
Tumblr:
– should work with blogs with endless scroll;
– photoset links fixed;
– rough support for inline images.
DevianArt:
– added :)
– due to the way, how DA works, link in right sidebar may not always present. Reload page in case of that.
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
With last version of DeviantArt userscript you may be prompted to allow access to "orig00.deviantart.net" and "www.deviantart.com". It’s required for retrieving link to the full version if it exists.

Nevermind, there is @connect tag for that cases
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
So, I finally did a thing I wanted for a long time: showing what exactly will you get in tags when you upload an image.
This thing is customizable and can be turned off if you don’t want it. Please check your settings page (after about 9 month I finally understand, that script may perfectly work with minimal changes without explicit installation).

Since 0.3 there is no useless messing around with hypothetical stuff which does not affect to anything at all.

So, implied tags will be transparent. If you click it, tag will be inserted (for real this time), and may cause new implications. You cannot hide transparent tags, because there is no real reason to do it, tag will exist on uploaded image (but if you remove parent tag, transparent one will be removed too).
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
Added YCH.Commishes userscript. Should fully support https://ych.commishes.com/
Support of https://portfolio.commishes.com/ is dirty and incomplete: it does not providing original file. It doesn’t even allow you to upload file directly right now. Right now it just grabs info about original dimensions and provides rendered thumbnail with mentioned resolution. Result files should not be considered as original because of jpeg compression (even if script tries to provide as much quality, as possible).


Expected size — in which size file was uploaded and original file dimensions.
JPEG size — multiplier for jpeg thumbnail. Bigger size should reduce jpeg artifacts but will result in longer processing.
HQ rescale — uses sharper downscale algoryth but works longer.
Please notice that source file may be jpeg as well, so you may see artifacts even in 8x HQ.
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
Added ability to work with all Derpibooru domains. Choice is based on which Derpibooru domain you used last time. If upload links still direct you to www.derpibooru.org regardless of what you actually use, ping me.
Posted Report
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
Reworked UI and fixed bunch of bugs


– implied tags now shows separately — backspace now should work correctly;
– notification container from now has limited height — it won’t blow up too much;
– implication notifies now 50% smaller — and you still can remove them in settings;
– tag names now shows as tags — if you have YDB:Tools they will be colored;
– no more overriding — nothing will be lost, if accidentally go back and forward;
– fixed issue with parenthesis in aliased tags — no more %2529 and such.
Posted Report
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
Was able to rework portfolio.commishes userscript, now it’s much cleaner and simpler to use (and the most important, provides true original image)


May require to connect with commishes.com because of redirects.
Some images may not work at all and I have no idea, will remained part ever work few days after.
Also as you can see, about half of images have no preview and script won’t solve this issue.
wtf is going on with this site?..
Posted Report
St@SyaN's avatar
Posts: 605
St@SyaN
Artist
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)
Birthday Cake - Celebrated MLP's 7th birthday
Magnificent Metadata Maniac
Equality - In our state, we do not stand out.
The Power of Love - Given to a publicly verified artist with an image under their artist’s tag that has reached 1000 upvotes
Cool Crow - "Caw!" An awesome tagger
Economist

Site Moderator
Personal title is too lo
Heavily optimized script: added option "Batch tag loader", which makes 1 request instead of 50. Should be enabled by default, in case of errors or wrong behavior can be turned off.
Posted Report
Interested in advertising on Derpibooru? Click here for information!
Equestrian Stories

Derpibooru costs over $25 a day to operate. Help keep the site up - support us on Patreon!

Syntax quick reference: *bold* _italic_ [spoiler]hide text[/spoiler] @code@ +underline+ -strike- ^sup^ ~sub~