****************README****************
This WAF is made to be integrated with KUAL.
You need to jailbreak your Kindle and to install KUAL.
If anyone wants to work on it and make it better, just post the results here for everyone.
Old versions can be found here.
I'm not responsible for bricks (I even don't know how they can happen, this WAF is safe), file deletions (once again, really unlikely) or any other problem.***************************************

Please note that upgrading to a new version will keep your bookmarks and your Gallery folder (except when updating to V2.3).
On the other hand, uninstalling will delete all Komic folder and Komic folder.**************************************

************WELCOME PACK*************
When installing or upgrading Komic from V2.2 on, you'll find a small =README= folder inside the Gallery folder.
Open it with Komic to see a short changelog and a few infos on how to use Komic.
You can delete it!************************************

************STILL TO DO*************
- bring back pinch-to-zoom
- handle HOME button (in V2.3 you need to tap CLOSE on the alert when exiting Komic)************************************

FOR EVERYTHING ELSE, USE THE HELP PAGE INSIDE KOMIC
IT TOOK A WHILE TO WRITE IT DOWN IN ITALIAN/ENGLISH, SO PLEASE USE IT!!

KOMIC V1.7

Spoiler:

ChangeLog:
- added ancillary functions
- new Schedule folders deletion option in menu
- dropdown menus show names in a dynamic way based on the maximum amount of characters available
- few code improvements

Note that installing v1.7 removes old ImageGallery entries in appreg.db.
If you want to downgrade (why?), you'll have to use the plain install packages.

ChangeLog (this is huge...):
- added total page number for every comic
- better error control and handling
- Jump to page now has a control over unexisting pages
- added schedule deletion in reading menu + a reminder in titlebar
- lock image size now locks also scroll position to provide a sort of "white margins deletion"
- in landscape mode, adjust scroll has now a slidebar to tune the amount of scrolling
- added the ability to choose clockwise or anticlockwise rotation for landscape mode
- added the ability to maintain image aspect ratio
- added sounds in all scripts when done (or when you get an error). You can enable/disable sounds.
- lots of under-the-hood improvements (it should be a little faster now)
- minor UI improvements
- brand new bin update to install and uninstall Komic (it will also keep your bookmarks!)

ChangeLog:
- refreshed Options menu in Home with two pages
- new options: remember mode, go to last read
- autojump now works also for previous comic (i.e: if ON, when on first page and going to previous page you'll be redirect to previous comic)
- scroll amount is now saved even if Komic is closed
- fixed the force close problem
- added Check for updates ancillary function
- code improvements in all ancillary functions
- minor UI improvements
- lots of under-the-hood improvements

Please note that, due to a change in how bookmarks/options/deletions are managed, this time is impossible to keep your preferences.
Updating will mean losing them, sorry!CLICK HERE TO DOWNLOAD KOMIC V2.3

As I can't upload all screenshots in this post, please refer to this Flickr account!
(Yes, some of these pics are in italian...sorry!)

Got a question that's been on my mind for a while. You said in the past to delete bookmarks once you're done with them to keep some file manageable. What happens if I delete a directory without removing the bookmarks?

I want to thank you for working on this. This is a great way for me to enjoy my large manga collection on my KT. It works great. Before this, I was converting things to mobi files. This is much more convenient and give a better result.

When you delete a folder, the script deletes also the bookmark if present!!

As regards auto saving a bookmark, it could be done! Bookmark could be saved when you return home and/or change a folder.
EDIT: Do you prefer to autosave bookmark only when returning home or also when changing folder?

When you delete a folder, the script deletes also the bookmark if present!!

OK, so to keep the files behaving, I need to do the deletions through the scripts and not my PC?

What does the rename script look at when it renames? I got some pretty weird behavior. The files were named 03_001, 03_002, etc. with the credits named as such. The credits were interspersed with the regular pages. Just a FYI. I'll be going back to Mangle to get my double pages automatically rotated. Such is life, huh? Still, great feature to add.

Since CBZ/CBR support is uncompressing them on the Kindle, I might as well just do that on my PC--I'm not saving any space. Does that feature take up much space on the kindle? If so, maybe offer a Lite version? Just an
idea--no need to have 2 versions if that's too difficult/unwieldy.

so much for this. I get to use my touch for the reason I upgraded from my Sony Reader Pocket. Larger screen for manga!

OK, so to keep the files behaving, I need to do the deletions through the scripts and not my PC?

What does the rename script look at when it renames? I got some pretty weird behavior. The files were named 03_001, 03_002, etc. with the credits named as such. The credits were interspersed with the regular pages. Just a FYI. I'll be going back to Mangle to get my double pages automatically rotated. Such is life, huh? Still, great feature to add.

Since CBZ/CBR support is uncompressing them on the Kindle, I might as well just do that on my PC--I'm not saving any space. Does that feature take up much space on the kindle? If so, maybe offer a Lite version? Just an
idea--no need to have 2 versions if that's too difficult/unwieldy.

so much for this. I get to use my touch for the reason I upgraded from my Sony Reader Pocket. Larger screen for manga!

This time, I can't understand much...

Folders delete script removes scheduled folders...I think that, once a folder is removed, than you don't need the related bookmark (if present), so the script removes also the bookmark.

Rename script gets a list of folders in /documents/Gallery containing jpg, png, JPG, PNG.
Than it gets, for every folder in that list, a list of files and it sorts the list based on the original filename.
If the first file of this new list has 0 as filename, it skips that folder.

I tried with a list of files named 03_001 to 03_200 and it worked.
I can't understand this part: "with the credits named as such. The credits were interspersed with the regular pages".
It would be helpful if you could send me a sample!

As regards decompression, all the feature takes 170KB.
I know it's a slow process...mounting the archive would be faster but I'm working on it.
Anyway, I can't understand how this feature could save space.
The minimum space required would be the size of the archive (if mounting it. As I'm decompressing it, the space taken is a little bit more).
I can't get to use fewer space than the size of the archive!

I added mainly because someone asked for it, and because copying CBR/CBZ to the Kindle is easier than decompressing them before copying folders.

It did the 03_001, 03_002, etc fine. The credits were "credits1" "credits2" etc. I try and keep the scanlation group's credits pages. Instead of being at the end of the directory, the credit pages were irregularly inserted at the beginning

See attached picture for 1 chapter of a typical manga scanlation. I also included a zip file with the first 2 chapters from the title I saw doing this. It's annoying, to say the least.

I didn't realize the resources to unzip were so small! I'd think they'd be in the megabyte range.

Hi silver18! Thank you very much for your hard work! I am really enjoying you app!
Could you please help me with these two files? Komic just creates empty folder after decompressing these archives. Thanks in advance.http://db.tt/Bcq9t8Gwhttp://db.tt/RyoYrjTV

Hi silver18! Thank you very much for your hard work! I am really enjoying you app!
Could you please help me with these two files? Komic just creates empty folder after decompressing these archives. Thanks in advance.http://db.tt/Bcq9t8Gwhttp://db.tt/RyoYrjTV

The first one is mis-named, I did not check the second one.
If using Windows, change your preferences to display file extensions.
That first name ends in: .cbz.zip
But it isn't a zip of a zip (cbz) file - just rename it without the '.zip'.

It did the 03_001, 03_002, etc fine. The credits were "credits1" "credits2" etc. I try and keep the scanlation group's credits pages. Instead of being at the end of the directory, the credit pages were irregularly inserted at the beginning

See attached picture for 1 chapter of a typical manga scanlation. I also included a zip file with the first 2 chapters from the title I saw doing this. It's annoying, to say the least.

I didn't realize the resources to unzip were so small! I'd think they'd be in the megabyte range.

I understood the problem: I wrote the code thinking about a folder containing files with only one name pattern (03_XXX) and not two (03_XXX and CreditsXX).

The *nix list (ls) command normally returns the names in sorted order. You have to pass the "-f" option to see the directory (hash) order.
And if the list (ls) command on the Kindle is provided by Busybox, it may or may not be listing files in sorted order, it may or may not have an "-f" option.

Translation: The order of the files returned by "ls" may not be the order your program sees them - you will have to sort them.

- - -

The Title field is "mixed" (bumpy) case and being written to a FAT-32 volume on Linux.
So check the mount options of that USB storage area -
The mount command without arguments shows what options current file systems have been mounted with:
(non-Kindle, but a FAT-32 volume on Linux as an example)

Your looking for what Amazon/lab126 decided to use for the "shortname" and "character set" options.

The result of their choice of options may also have to be dealt with even though these are "long names".

Edit:
The names are bumpy case, the XXX is not. So a token of some kind?
RHN == Right Hand Number == trailing volume number, trailing page number?
I.E: Process string right to left, first character sequence describes where the page numbers are at in the string?

With that information, then you know how to compute the file name of a page number. No sorting and renaming with a leading sequence number required.

Duh... Just guessing. First digital comic book I have ever looked at - mine where on paper.