Auto-rename images

Joined
Jul 24, 2018
Messages
490
This is one for a script to run once for everything (though it would take a while initially), and run on chapter upload.
Simply add the chapter to the filename.

1.png from chapter 12 becomes 0012_1.png
d12.png from chapter 16.5 becomes 0016.5_d12.png

Why bother? Because it is extremely annoying to have to manually rename every single image I decide to save - which is something I do frequently(and I'm probably not alone on this). Scanlation groups more often than not are using the same file names from one chapter to another, so I find myself mashing keys to make the filename unique. Sure it would be nicer if groups had better naming practices, but since that is unlikely to happen, a script that gets ran during the upload process would do just as well.

Even if you find it would be too much trouble to rename existing files (very understandable), it would still be quite helpful to apply this to new uploads.
 
I am a leader of a scanlation group and I help other scanlation groups but I think the auto-rename part is a bit annoying to me. I prefer that I rename it manually, because sometimes auto will always have errors and then eventually it may save the wrong image as the next image. Like let's say 01 which was the first page got automatically saved as page 05 instead, and then 05 got saved as page 10. So I really don't think auto works all the time. There are scripts that you can save automatic rename but it's annoying to have to manually make sure all pages are correctly numbered.
 
@bk3k Sounds like you would find this guy's program useful, lol
https://mangadex.org/thread/162757/1/#post_997251
 
@NibbPower
My example keeps the existing filename, but appends the chapter to the front so nothing is getting out of order.
In other words <chapter number> + "_" + <current file name>.
You'd have to really, really mess up a script to do what you fear - to the point you'd have to intentionally screw it up. The example even shows the chapter is zero loaded so 12 doesn't appear before 2. Because 0012 > 0002. If things are messed up like that, they where already messed up before you tried to upload.

I'm talking a pretty script really. But maybe I should just get into making browser extensions instead...

As for using programs after the fact, well that's only so useful - since I would need to know where the picture came from. It won't really take any hassle out of saving the image to start with and also I'd need to go back and figure out what chapter the image came from with anything I already have. Thus the only real solution that avoids the hassle is being named adequately on the server, or an extension that takes the place of the usual download prompt.

That idea I had for an extension might work out pretty well anyhow, because I can have it choose the destination for me
<configured_default_path>/<series_title>/<chapter number> + "_" + <current file name>
as the destination. Although I've never made a browser extension before, but I should be able to as soon as I find the time and motivation. But I figured things being done on the server's end would be useful to a lot more people than just me.

edit:
The HTML for a given chapter seems to have volume and chapter data, so that's even better to incorporate that into the name.
 
Essentially, the OP has a preferred naming convention, and wants the site to adopt it. It's not my preferred convention, which I get with a shell script but could get with programs of various other sorts.
 
@Oeconomist
the OP has a preferred naming convention, and wants the site to adopt it.
The way you are putting it sounds worse than what it is. I proposed one sample naming convention, but really I just wanted them to adopt ANY naming convention at all - anything is infinitely better than nothing at all. What we have no is usually it is just the same file names repeated over and over. 1.png, 2.png, and so forth. And I'd bet I'm not the only one annoyed with this.

But yeah I'll probably just end up taking that into my own hands and that will work out perfectly for me in the end. Still probably < 1% of your users will have the technical knowledge to do so. So me handling it myself only helps... me and no one else. That's the big downside of leaving it entirely to the end user.
 
@bk3k

Certainly more people could embrace the idea that there should be some naming convention than would agree to that specific convention which you first proposed, though, ultimately, it would come down to a specific convention, which convention would not be viewed with universal warmth.

I'd say that, if you really wanted to serve the less technically able, then the file name should contain a series title, the volume number, the chapter number, the scanlation group, and a timestamp of most recent upload. (The last mentioned datum would deal with cases in which a correction had been made.)

But I'm not really sure who would be served. Having many files named “q1.png” (or somesuch) is a concern only if the downloader is dropping more than one of those files into a shared folder. Nearly every user is capable of creating sub-directories. Who is putting these files into a shared folder on such a large scale that it isn't practical to rename them as they are downloaded or in some other un-automated way?
 

Users who are viewing this thread

Back
Top