manga-download / hakuneko

Manga & Anime Downloader for Linux, Windows & MacOS
https://hakuneko.download
The Unlicense
4.79k stars 469 forks source link

Naming downloaded files and folders #6632

Open metacreature opened 11 months ago

metacreature commented 11 months ago

3 issues with nameing the downloaded files! eg. "MangaBuddy - Looking up to Magical Girls"

1) If you download it all chapters get mixed up, coz they are all named different - some are named "Vol 1 Chaper 5" others are named "Chapter 6" or even "Bonus 1" => if you store the folder on the harddisk it would be cool if there was a zerofilled prefix, that the order is preserved. ==> I would recommend 0010_[original_name], coz there are mangas having more than 200 chapters

2) There are often: Chapter 23 Chapter 23.5 .... you can't merge those chapters easily, coz the images allways start with 01.jpg => a unique file-name would be cool! ==> I would recommend [chapter-prefix]_0010, coz I've downloaded a chapter having more than 100 images (by mistake of the creator, but it could happen).

Adding a suffix-0 is pretty cool when you want to insert spacer-images or swap images its much easier.

3) Download-Order: Many websites publish the chapters in reverse order. ... so if you do the prefix and unique name above you still can't manually merge chapters => let the user deside in which order he wants to download => or if you are really cool, go through each connector and set the correct order there, starting with the first chapter

So the output-structure would look like this:

0010_Chapter 1/
        - 0010_0010.jpg
        - 0010_0020.jpg
        - 0010_0030.jpg
        - 0010_0040.jpg
 0020_Vol 1 Chapter 1.5/
        - 0020_0010.jpg
        - 0020_0020.jpg
        - 0020_0030.jpg
        - 0020_0040.jpg

As its now you have to spend days for creating an eBook, so if you could do it like that it would be really cool!!!

If you could do exactly like I've suggested (or we could find a format together) I could fit my ecmb-builder .... its a bigger project I'm currently working on: https://github.com/metacreature/ecmb_builder (not ready yet) I could deal with the reverse order of chapters if you are unable to do this. coz I have a reaming-functionality, where I could swap the order ... but therefore we have to have a defined naming-format

PS: if you only download eg "Chapter 30" the prefix of course shouldn't be 0010 ... you have the full list of chapers and can determine its number ;)

Sheepux commented 11 months ago
  1. You can use the chapter Title format in the options as %VOL% and %CH% have padding (As far as i remember) and are based on the chapter name (as best as it can infer).
  2. That's not really an issue regarding hakuneko. Is it ? Merging chapters is not an hakuneko's feature. In some website 5 can mean a newer version (eg: .1,.2,.3,.4,.5) and not something you want to merge
  3. Regarding CMB we're currently going with ComicInfo.xml inside the CBZ . Also .... Isn't the reverse button already there ?

Also, not a bug but feature requests.

MikeZeDev commented 11 months ago

1) As each websites have different naming schemes, sometimes event different between mangas, and very often its not even consistant, its really a mess to begin with. Trying to correct this mess is a nearly impossible / hard task.

2/3) Nothing more to add.

metacreature commented 11 months ago

@Sheepux

1 ) Forget parsing the titles ... its impossible, coz they are all look diffren.! I tried with my scraper and I had to fix it for every single book => a zerofill - prefix would solve the issue with the mixed order and thats just an easy task

2 ) Merging chapters is not an hakuneko's feature.

Yes, you are right. thats not the task of hakuneko! Its impossible too!!!!

Its the task of the user to do this if he wants to take the time. But with the naming-conventions you actually have the user would have to rename every single image instead of just moving the files to a different folder. If there would be a suffix-0 it makes it much easier for the user to move single files or add spacer-images. Fan-translated Mangas are really, really REALLY messy and I even found political statements mixed under the images. If you want a good book you have to go through the files manually - and that really pays off.

3) Thanks for that tip. I was really searching for it, but I couldn't find anything. I will read it and be inspired.

But my book is not only about reverse order :p It comes also with and advanced navigation, advanced double-page-handling and also with a "better" content-warnings. The problem with the one from ComicInfo.xml is, that every country has different laws. I was inspired by https://www.anime-planet.com/ which uses content-based warnings. Maybe - even as an adult - I want to see nudity, but not explicit violence or explicit sex.

https://github.com/metacreature/ecmb_definition/blob/master/examples/v1.0/example_full.xml (regarding the spine I was inspired by ePub ;))

And the biggest issue of the other formats are not the formats themselve, but the readers. Very buggy, only support half of the formats capabilities. For my format there is actually not a single reader, but I will do one combining all the ideas of the other readers and perfectly fitted for reading comics and mangas with my format :p

An issue with my format is: Its hard to create, but thats the job of the library I've done - so no problem for the programmer. On the other hand its very easy for the reader-app ;) I will do a library for node.js too - so you could use it for your project if you want

@ MikeZeDev

As each websites have different naming schemes, sometimes event different between mangas, and very often its not even consistant, its really a mess to begin with. Trying to correct this mess is a nearly impossible / hard task.

I totally agree!!!!! Its impossible!!!!! But adding a zerofilled prefix is just simple and would solve the problem :p

2) It it really hard to change it from a 2-digit-zerofill to a 3-digit-zerofill? Is it really hard to add '0' as a suffix to the file-name? Is it really hard to add the chapters-prefix as the image-prefix? The image has to know in which folder it should be stored - so even if you can't pass this value to the image-save-function you could cut the prefix from the path. Coz you have created the prefix you know how it looks like => just a simple regex

3) No, its not hard, but its a LOT of of work, looking at the number of your connectors ... and at the end a website mixes it up too. To switch the order of the chapters would be just an easy task for my builder - so I don't have a problem with this! BUT: people want to build ebooks directly with your app .... I guess they are unhappy with that too ;)

I could fork the project, add those few lines for 1&2 if you want, and then make a pull-request ;) ... but atm I'm really busy with getting my project published and the reader-app I havn't even started - I guess 4 weeks

Sheepux commented 11 months ago

Use the chapter title format, it works fine in a lot of cases (not all indeed), it does zerofill by itself

Filename is intentionally the same as the website by default as it allows the connector to find the file again. What you want is probably not a feature we'll be working on because of too many implications. Also it's something optionnal as it's only for some rare usecases (i don't want the chapters with digit prepended) Contributions are always welcome (but don't do it for hakuneko do it in haruneko)

metacreature commented 11 months ago

Filename is intentionally the same as the website by default as it allows the connector to find the file again.

f*** There are websites using an unique-Id for their file-names or don't use zerofill .... so even the images themselve could be mixed up? eeeek*

No problem too: [zerofill-chapter-prefix]_[zerofill-image-prefix]_[original-image-name] Coz you have defined the prefixes you can easely cut them of to allow the connector to find the file again.

i don't want the chapters with digit prepended?

So you prefer to having useless, totally mixed up books? For the build of an CBZ? Coz you have defined the prefix and so you can cut it easily off for build But if you didn't manipulate the Chapter-names before the build your books are mixed up again.

Thats the advantage of *ecmb. You have a seperate navigation (with label and title) and only the order in the xml (= the order you have added with my library) counts. A simple navigation is easy to do with my library. If you didn't (the navigation is optional) it atomatically names "Chapter 1" from the folders, which use internal names and are sorted by the XML = the order you have added with my library.

My builder reads the files of course sorted alphanumerical (like every other builder too) ... so if you leave it like that the outcome would be the same mixed-up order like CBZ

If you defined chapters with [zerofill-chapter-prefix]_[original-chapter-name] of course I would cut the prefix off ;)

I know what I'm doing :p

metacreature commented 11 months ago

but don't do it for hakuneko do it in haruneko

What's the difference?

BTW: I just figured out that there is a sort-functionality for chapters in your GUI. I guess its GUI-only and reverse-order is missing (only original, alphapetical asc, alphabetical desc) .... so half of the work with the reverse order is done.

To clarify the problem a bit more: Image2 Image1

You would have to spend days for cleaning that up manually and could even be impossible if the images are mixed up too. If there were a correct and preserved order of the chapters and unique-file-names its a job of only a few hours doing that manually. Of course its impossible to clean up automatically.

@Sheepux I couldn't find a button for "build CBZ" in your programm so I guess you have a manual step too. OK, you don't want to have the prefix in your CBZ .... You would have to touch every folder-name anyways with that mess - I can't imagine that don't care => it would be easier for you too

Sheepux commented 11 months ago

Haku is not maintained anymore, haruneko is the next version (full rewrite)

We understand the use case, but we are not interested in doing it as we have much higher priorities (haruneko).

CBZ : Open the options ... everything is here ... as well as the CHAPTER TITLE FORMAT that allows to pad zeros.

metacreature commented 11 months ago

CBZ : Open the options ???????

Is there a programm to pack cbz?

Haku is not maintained anymore

https://github.com/manga-download/hakuneko/activity ?????

OK, haruneko is the next version - looks better and has many improvements. But "download all chapters" is missing - so I would use hakuneko ;)

Sheepux commented 11 months ago

Open hakuneko's serttings, it' s the 7th one "chapter file format" just after the "chapter title format"

And yes, no new features are added in haku by the main maintainers

metacreature commented 3 weeks ago

@Sheepux

I have finally finished my new comic-manga file-format and of course an Android-App to read this new file-format. There is also as part of the builder a file-renamer to clean up the messy source-files.

If you are interessted: https://github.com/comic-manga-ebook