Canti
@author: Andrew Mantel
@version: 1.7

New to version 1.7:
-Source files in zip/cbz format
Program can now process manga located in -parent_folder in .zip or .cbz format.
You can also set -parent_folder to be a .zip or .cbz file.
Note that this will only process the images in the root of the archived file, so if you have an archive with multiple levels of subfolders then the images in those folders won't be processed.
-Delete output image folders after processing
This feature can only be used if:
  1) You output zip/cbz archives as these will allow the program to temporarily recreate the output image folders in case you need to process the same manga again (a big time saver)
  2) Binding (either through bind file or auto-binding) is disabled
This is set up in the .properties file.
-Pdf page/bind ordering from right to left
Same as epub right to left feature introduced in v1.61, now for pdf.
This is set up in the .properties file.

New to version 1.61:
-Epub works in iBooks
Epub is finally out of beta and the output epub files can be synced through iTunes and read in iBooks.
I do not recommend epubs for manga though... a good portion of the screen is used by the virtual book, you can't zoom in on images,
and iBooks sometimes sizes the images wrong (especially when switching from 2-page to single-page view, the image may remain at the smaller 2-page size).
-Epub page/bind ordering from right to left
Hehe, this is a cool feature to try out in iBooks. By turning this option on, the ordering of the output epub will resemble that of manga (i.e. pages and bindings will be ordered right to left).
Currently iBooks automatically loads page 1 of the epub, so if you use this feature you will have to either use the page slider to jump to the last page or (if you used binding) load the first chapter from the table of contents.
Kinda fun to see the virtual iBook with proper manga ordering :)
This is set up in the .properties file.

New to version 1.6:
-Auto sense suffix
By not setting (or setting to -1) the -num_chars_keep_suffix value, the program will attempt to automatically determine the suffixes of your manga folders.
Note that each manga folder must end with a number such as 1, 001, 1.11, or 001.11 for this to work.
-Output base folder
Instead of specifying -output_folder at runtime, can specify an output base folder in the .properties file.
If the value is set to "default", then the output_base_folder will be: one directory up from -parent_folder/OUT/
If this value is set to [path to output base folder], then the output_base_folder will be: [path to output base folder]/[manga title]/
Acceptable values: default, [path to output base folder]
For Linux systems, [path to output base folder] should be something like /home/[username]/Manga/IPAD/
For Windows systems, [path to output base folder] should be something like C:\\Manga\\IPAD\\
Note that [path to output base folder] cannot contain any spaces.
-ComicZeal naming
For iPad users who read manga using ComicZeal (like me), this option uses a special ComicZeal naming scheme for the zip archives.
It places the title of the manga at the beginning of the filename, followed by a ~ (for example: School_Rumble~School_Rumble_-_Ch.001).
When ComicZeal imports these specially named files it will automatically sort the manga into the correct collections.
This is set up in the .properties file.

New to version 1.5:
My parents surprised me with an iPad (they are awesome!), so now I have one to test manga on.
Manga looks great on the iPad, and I've changed the defaults in the .properties file to reflect the best settings for the iPad.
Also, for iPad users I recommend getting a reader app such as Goodreader for pdf manga, or better yet ComicZeal for cbz manga (that's what I use).
-Single folder mode
Instead of batch processing a collection of organized manga folders, you can specify a single folder to process.
This works transparent to the user. When you specify -parent_folder it checks whether there are subfolders (batch mode) or not (single folder mode) and then continues working accordingly.
-Full size images
Instead of specifying a width and height to resize images to, now you can leave the images the same size as the source images.
I recommend using this setting for the iPad since the larger images are better to zoom on, and the iPad makes it easy to zoom on images.
This is set up in the .properties file by setting "width" and/or "height" to -1
-Can disable auto rotate for portrait images
Before I had portrait images automatically rotated to landscape mode by default, but now you can turn this off if you want.
This is set up in the .properties file.
-Binding for epub
Now you can bind multiple manga folders into a single epub.
Note that epub is still in BETA. I can sync the epubs using iTunes, but I can't get them to appear in iBooks. If you know how to fix this please pm me on mobileread.com (username "lilman").

New to version 1.4a:
Fixed an error in the toc.ncx file of the epubs.

New to version 1.4:
-Epub
This is in BETA! I do not have an iPad and so I have no idea how this will look on one.
I wanted to add epub support so that you could add your manga to your iTunes library, making it easier to sync (and also so you could view it in iBooks).
This is my first experience with epubs and I wrote the code from reading epub tutorials online. A lot of this is guess work and therefore will most likely not work perfectly.
If you have any epub experience and know how to make these epubs work better on the ipad, please pm me on mobileread.com (my username is lilman). Thanks!
This is set up in the .properties file.
Note that there is no binding support for epubs yet.
-Bug fix: Fixed changing page_filename_length after processing manga will correctly rename image filenames when binding (I know, you probably would have never noticed this, but I did and it bothered me :P)

New to version 1.3:
-Auto-Binding
Same as binding, except you don't create a bind file. Instead, you just specify a single size for all bindings (for example, all bindings could have 10 folders in them).
This is set up in the .properties file.

New to version 1.2:
-Binding
Binding allows you to easily combine chapters into volumes while still keeping your original manga chapter folders intact.
See the included bind.txt for instructions on setting up a bind file.
-Can specify zip format (either .zip or .cbz)
I figured some comic programs might like the .cbz extension better. This option is set in the .properties file.
-Changed command line parameters
I changed some of the command line parameters, so run 'java -jar ConvertManga.jar' to see the list of new commands.
-Other random tweaks
I rewrote a good chunk of the code. Lots of error handling and other nice stuff. For example, let's say you already converted a lot of manga but
you added a few more chapters to your collection. The program is smart enough not to reprocess manga that has already been processed (a big timesaver).

New to version 1.1a:
Fixed the grayscale not working bug.

New to version 1.1:
Since the iPad is about to come out, I made some small changes to the program to accomodate the new shiny device.
-Added support to .properties file for specifying color or grayscale of output images.
-Added support to .properties file for specifying number of colors of output images, or not limiting the range of colors at all.
Also, I got tired of calling this "my manga processing program" so I'm giving it a name: Canti, after the Medical Mechanica robot from FLCL. So anyway, enjoy Canti version 1.1.


Instructions:
1) Install ImageMagick. ImageMagick is free software used for image manipulation and can be downloaded from http://www.imagemagick.org/script/binary-releases.php
2) Edit ConvertManga.properties file to suit your needs. The default values are for Kindle DX users / Linux operating system, so read the file and make any necessary changes.
3) Make sure your manga scans are organized like the following example:
   Manga_Title
     Blah_blah_001
     Blah_blah_002
     ...
     Blah_blah_999
4) Open a command prompt to the folder containing ConvertManga.jar and .properties. Run:
   java -jar ConvertManga.jar
   This will give you a list of the commands you will need to specify to run the program. Here is an example of running the program:
   java -jar ConvertManga.jar -parent_folder /home/my_name/Manga/School_Rumble/ -prefix "School Rumble - Ch." -num_chars_keep_suffix 3 -output_folder /home/user_name/Manga_Kindle/School_Rumble/
5) Let the program run. Depending on how much manga you have and the speed of your computer it may take some time to finish. It will give you a time estimate based on how much work it has done and it much work is left to do.


Note:
I wrote this program for fun. It works great on my Kindle DX. I hope you enjoy!

Also, I HIGHLY recommend using pdf for manga on the Kindle DX.
