Topic: [Userscript] Set Importer

Posted under Blep Tools and Applications

One userscript. No Python, no API key, no setup beyond installing it.

Install

Use

  • Click Import Set and paste a source set URL, e.g. https://e6ai.net/post_sets/705
  • Check - shows how many posts can be transferred and how many would be skipped.
  • Import - creates the set and fills it in batches.
  • Make public - only works once your account is at least three days old.

Running it twice is safe: if a set with the same shortname already exists, only the missing posts are added.

Important: post IDs have to match

This only works because blep.art uses the same post IDs as e6ai.net - the same ID is the same file on both sites. The script verifies this by comparing MD5 hashes of a sample of posts before it writes anything, and aborts if they differ.

That makes e6ai.net the only useful source. e621.net (and e926.net) look like the same software, but they have their own, completely unrelated ID space:

post 101 on e6ai.net  -> md5 b55ca6d0e6baa7eb93330280a0d87513
post 101 on blep.art  -> md5 b55ca6d0e6baa7eb93330280a0d87513   (same file)
post 101 on e621.net  -> md5 dc5ca546f6776f30a83c888dd4ba3182   (different file)

So an e621 set cannot be imported - the script stops at the check step instead of adding a pile of unrelated posts. For the same reason there is no "import from e621" workflow to look for.

What it handles

  • 320 posts per request, batched automatically.
  • Rate limits: 2.5 s between batches (the server allows 30 set changes per minute).
  • Name collisions: both name and shortname must be unique, so it retries with a _2 / (2) suffix instead of failing.
  • Deleted posts are included so the count matches the source. They do not appear in search but still exist on blep.art, and sets accept them. Untick "Also add posts that only exist as deleted" if you would rather leave them out.

The three-day rule

Can't make a set public until your account is at least three days old

If you hit this, the set is created private and you can flip it with Make public later. All posts are already in it, nothing is lost.

Safety

  • No API key, no password - it uses the session you are already logged in with, so it never sees your credentials.
  • Nothing is sent anywhere except blep.art and the source site you type in.
  • No files are copied or uploaded. blep.art already has the posts; this only builds a reference list.
  • Read it before you run it - it acts with your session.

Known limitation

Post order may differ from the source. The server appends each batch in ascending id order (PostSet#process_posts_add! drops the submitted order) and no API reorders a set afterwards. All posts are present, just not necessarily in the original sequence.

Limits

  • Posts per set: 10,000
  • Posts per request: 320
  • Set changes per minute: 30
  • New sets per hour / total: 6 / 75
  • Public sets: account age 3 days or more

Troubleshooting

If something goes wrong, click "Copy info" in the panel and paste the result into this thread. It contains the version, your browser and the last error, which makes a fix much faster.

Version 1.2.1 - feedback and bug reports welcome in this thread.

Updated

list

Member

IMO not transferring the deleted images was annoying since it made my transferred numbers off slightly.
I may be the only one that cares though.
I ended up manually adding them just so my counts would match. Still a fantastic userscript, I only had to manually move ~10 vs ~200

Odd. I'm guessing sets couldn't be transferred automatically since base e6's db export apparently doesn't do the sets table.

Good news - you were right to care about this, and I had it wrong in the first version.

Those posts are not missing at all. They still exist on blep.art, they just do not appear in search results because they are flagged as deleted. Sets accept them regardless, because the server does not filter by deleted status when adding posts.

So in v1.2.0 they are included by default:

Searchable on blep.art:        1892
Not listed (deleted, addable):  138

The count now matches the source (2030). If you would rather leave them out, untick "Also add posts that only exist as deleted" before pressing Import - that is the old behaviour.

For your set specifically: running Check + Import again is safe. It reads what is already in the set and only adds what is missing, so nothing gets duplicated. You can bring your set to the full count without moving anything by hand.

Sorry for the extra manual work the first time round - about 10 posts, from what you wrote, because most replacements were already in the set.