Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Grinch27's EH Uploader Toolkit, Sort Img by numbers, Good for Pixiv Set etc

 
post May 3 2022, 13:49
Post #1
Grinch27



Lurker
Group: Lurkers
Posts: 4
Joined: 31-July 14
Level 161 (Ascended)


Due to original Sort like Natural Sort or Lexical Sort doesn't fit me well

especially for those files like Pixix/Fanbox/Fantia set, because they usually have filename like (series_number)_p(index_number) which are consisted of more than two numbers.

And it's needed to show the newest series at first in the updating gallery, which means Serie goes Max first and then every Index in Series goes Min first.

Such as 002_001.gif, 001_000.png, 001_001.jpg, 001_002.jpg. Filename Format: .*Series.*Index.*.jpg

So I write this Javascript (run in Tampermonkey of Chrome/Firefox). So when get in to page like (e-hentai.org/upld/managegallery?ulgid=) or (https://upld.e-hentai.org/managegallery?ulgid=), you will find a small button named 'Smart Sort' which clicked will send a post to ehentai server with new order(Max Serie & Min Index goes first).

And then Reflash the Page, you will get the smart order.

Project here: [github.com] https://github.com/Grinch27/EH-Uploader-Toolkit
Javascript(early release version): [github.com] https://github.com/Grinch27/EH-Uploader-Too...Smart%20Sort.js

Welcome for any Issues, I'm busy but I will check it.

Hope this will help for those uploaders struggle with sorting img.
(IMG:[invalid] style_emoticons/default/biggrin.gif)


Use Sample, Before and After:
====================
Raw upload, Series and Index, Min goes first:
(IMG:[i.imgur.com] https://i.imgur.com/B9ODv2I.png)
====================
After Sort by Series and Index, Series Max and Index Min goes first:
(IMG:[i.imgur.com] https://i.imgur.com/jySWj6m.png)

This post has been edited by Grinch27: May 3 2022, 14:30
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post May 3 2022, 15:26
Post #2
nasu



さき★すかん
********
Group: Gold Star Club
Posts: 3,261
Joined: 13-June 16
Level 432 (Godslayer)


I tested it on a couple of galleries and it seems like it works pretty well.

I would suggest adding a confirmation box to the smart sort button because there is no way to cancel it if you mis-click the button at the moment. And maybe move the smart sort button to the bottom (with the other sorting options) so it's harder to mis-click it when uploading images.

This post has been edited by nasu: May 3 2022, 15:27
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post May 3 2022, 17:07
Post #3
Grinch27



Lurker
Group: Lurkers
Posts: 4
Joined: 31-July 14
Level 161 (Ascended)


QUOTE(nasu @ May 3 2022, 21:26) *

I tested it on a couple of galleries and it seems like it works pretty well.

I would suggest adding a confirmation box to the smart sort button because there is no way to cancel it if you mis-click the button at the moment. And maybe move the smart sort button to the bottom (with the other sorting options) so it's harder to mis-click it when uploading images.


good idea, now change to ver 0.1.1
now divide 'Smart Sort' button to 'Scan Smart' and 'Post Smart'.
when click the 'Post Smart' button, it won't post the order to the server until 'Scan Smart' clicked and scanned successfully. Kind of double check.

As for the location, it seems like that there's no more better place, for both the 'uploader comment form' and the 'img form' are set with post action which may cause trouble. I think it's ok to place the button in such a central <a> element for now, because the another choice is place of the top.

This post has been edited by Grinch27: May 3 2022, 17:10
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 22nd July 2025 - 12:52