CantiGUI
@author: Andrew Mantel
@version: 1.00a
----------------------------------------------------------------------
-Instructions-
1) Install java runtime environment (most computers should already have this installed). You can test if java is already installed by running:
   java -version
   Canti requires at least java v1.6. You can get the latest version of java from: http://www.java.com/en/download/manual.jsp
2) Install ImageMagick. ImageMagick is free software used for image manipulation and can be downloaded from http://www.imagemagick.org/script/binary-releases.php
3) Extract the CantiGUI distribution archive to a folder.
4) Make sure that the "lib" folder has Canti.jar in it. If it doesn't, download the latest version of Canti.
5) Run CantiGUI.jar.
   This is done by either double-clicking CantiGUI.jar (if it has executable rights), or you can open a command prompt to the CantiGUI folder and run:
   java -jar CantiGUI.jar
6) If this is your first time running CantiGUI, you will be asked to create or load a .properties file. Just follow the onscreen instructions in the "Settings" tab to create a .properties file for your particular ereader device.
7) Modify the settings to suit your needs. The default values are based on whatever os you are running and the ereader device you specified in Step 6.
8) In the "Run" tab, specify the parent_folder and title of the manga.

   There are several values you can use for parent_folder.
   For processing a single manga chapter, set parent_folder to:
   - A single folder of image scans
   - A single .zip/.cbz/.rar/.cbr archive of image scans
   - A single .pdf of image scans
   For processing a complete series of manga, set parent_folder to:
   - A folder containing any number of the above items, all belonging to the same manga series.
     For more details, see below.
9) If desired, enable features in the "Advanced" tab. All of the settings there are optional.
10) Click the "Run" button in the "Run" tab. Depending on how much manga is processing and the speed of your computer it may take some time to finish. It will display a time estimate based on how much work it has done and how much work is left to do.

----------------------------------------------------------------------
-Feature List-
+Image processing:
 -scale width/height
 -reduce to maximum dpi
 -auto trim white space around an image
 -auto rotate landscape images to portrait
 -full color or grayscale
 -specify # of colors
 -change source image format
+Supported input sources:
 -Single folder of images
 -Single .zip/.cbz
 -Single .rar/.cbr (Note: Must have compatible unrar program installed on your system. See below for details.)
 -Single .pdf
 -A folder containing any number of the above items, allowing you to process a whole manga series with one command (See -Processing an entire series of manga- section for details on how to organize your manga for batch processing)
+Supported output formats:
 -Folder of images (any format supported by ImageMagick should be ok)
 -.zip/.cbz
 -.rar/.cbr (Note: Must have compatible rar program installed on your system. See below for details.)
 -pdf (including right-to-left page ordering)
 -epub (including right-to-left page ordering)
+Supported input images:
 -Pretty much anything that ImageMagick supports (see http://www.imagemagick.org/script/formats.php)
  It's safe to assume that all major image formats are supported: .jpg, .bmp, .gif, .png, etc...
+Binding
 -Binding allows you to combine multiple input sources into a single output
 -Two ways to use binding:
  -Can create a bind file to manually specify which chapters to bind into a single volume
  -Can also auto bind a specified number of chapters into volumes
+Auto split landscape 2-page scans
 -Can detect whether a landscape scan contains two separate pages and split them accordingly
 -Tries not to split landscape 2-page scans where the two pages form one big image
 -Can also include the unsplit scan along with the two split pages.
+Generate a settings file for a variety of ereader devices
 -Optimal settings stored for many of the top ereader devices:
  Amazon: kdx, k2, k3
  Apple: ipad
  B&N: nook
  Sony: prs-900, prs-700, prs-600, prs-505, prs-500, prs-300
  iRex: iliad, dr800, dr1000
  Ectaco: jb, jbl
 -Can also generate a default settings file if Canti doesn't know the optimal settings for your particular ereader device
 -Any setting can be changed by the user to meet his/her needs
+Other operations:
 -Analyze manga collection
  Returns statistics such as # of file types, # scans, file space usage, etc.
 -Create Canti batch file
  Creates a script to process your entire manga collection using Canti.

Well, that's a list of the major features. For a full list of features you can read through the update history.

----------------------------------------------------------------------
-Processing an entire series of manga-
For processing a lot of manga at once, you can organize your manga like this:
  Manga_Title  <-- this is the folder you would specify as -parent_folder
    Blah_blah_001    <-- this is a folder or .zip/.cbz/.rar/.cbr/.pdf holding the image scans for chapter 1
    Blah_blah_002    <-- this is a folder or .zip/.cbz/.rar/.cbr/.pdf holding the image scans for chapter 2
    ...
    Blah_blah_999    <-- this is a folder or .zip/.cbz/.rar/.cbr/.pdf holding the image scans for chapter 999

When you are ready to run the program, use Manga_Title as -parent_folder.
Here's an example:
  C:\Manga\SchoolRumble\
    School_Rumble_001.cbz
    School_Rumble_002.cbz
    ...
    School_Rumble_283.cbz

java -jar ConvertManga -parent_folder C:\\Manga\\SchoolRumble\\ -title "School Rumble" -manga_prefix "Ch."

Notice that I added the argument -manga_prefix "Ch.". This will make the output files look like: School_Rumble_-_Ch.1.cbz, School_Rumble_-_Ch.2.cbz, ...
Also note that this is an example of running the program on a Windows machine and I used \\ instead of \ in the command line.

----------------------------------------------------------------------
-Setting up unrar/rar support-
Because rar is a proprietary format, Canti cannot simply read or write a rar file itself. It relies on your system having a rar handler already installed.
For unrar support, make sure you have installed one of the following:
  For Linux/Unix: rar, unrar, unrar-nonfree
  For Windows: WinRAR (installed to [drive_letter]:\Program Files\[folder with "rar" in its name, such as WinRAR]\)
  For Mac: rar
For rar support, make sure you have installed one of the following:
  For Linux/Unix: rar
  For Windows: WinRAR (installed to [drive_letter]:\Program Files\[folder with "rar" in its name, such as WinRAR]\)
  For Mac: rar

----------------------------------------------------------------------
-Other Operations-

Other Operations are programs embedded in Canti that do not directly process scans, but rather add complementary functionality.

Analyze Manga Collection
Canti will search through a given root manga folder and return to you statstics about your collection (# of files of different types, # of scans, file space used, etc.).
The basic command to run this is: java -jar Canti.jar -analyze_collection [path to root of manga collection]
This operation can take a while to complete, depending on the size of your collection.
The .properties file is required to run this operation since Canti uses ImageMagick to determine the number of pages in a pdf (and the ImageMagick install location is in the .properties file).
Because the rar format is proprietary, you must have a compatible rar handler in order to analyze rar (.rar/.cbr) files. See -Setting up unrar/rar support- in the readme for details.

Analyze Manga Folder
Canti will analyze all the image files in the given manga folder and give you image statistics such as width, height, and dpi.
The basic command to run this is: java -jar Canti.jar -analyze_folder [path to manga folder]
[path to manga folder] can be an image folder, zip, rar, or pdf. If it is a zip, rar, or pdf, then the images within the file will be extracted to a temporary folder before being analyzed.
The results will be displayed on the screen in a nicely formatted text table.
The .properties file is required to run this operation since Canti uses ImageMagick to determine image statistics.
Because the rar format is proprietary, you must have a compatible rar handler in order to analyze rar (.rar/.cbr) files. See -Setting up unrar/rar support- in the readme for details.

Create Canti Batch File
Creates a batch file to process your entire manga collection with Canti by just running the script (instead of having to manually type out a command line for each series).
The basic command to run this is: java -jar Canti.jar -create_batch [path to root input] [path to root output]
[path to root input] is the base folder of your unprocessed manga collection. For example, C:\\Manga\\, where C:\\Manga\\ contains all of your series folders like C:\\Manga\\SchoolRumble\\
[path to root output] is the base folder where you want Canti to output the processed manga. Each series will get its own subfolder within this root output folder.
Note that the automatic process for creating a batch file is not perfect. Setting the -parent_folder value for each folder is easy, but determining the correct corresponding -title and -output_folder can be tricky.
  Therefore, after the batch file is created, read through it and double-check the command lines it produces. Correct any -title, -manga_prefix, and -output_folder values as needed.
If on a Windows machine it is recommended to edit the batch file with Wordpad.
Also note that when you first run the create batch file operation, a new file "lowercase_title.txt" will appear in the same folder as Canti.
  This file contains a list of words that you don't want capitalized in series titles (like "the", "and", etc.), excluding the first word in a title of course.
  Read through this file and add or remove any words as needed.

----------------------------------------------------------------------
-Update History-

New to version 1.00a:
-Bug fix: CantiGUI's "data" directory may not be located in the same directory as CantiGUI.jar
Depending on how you ran CantiGUI (either executing the .jar directly or starting it from a command line), the location of the "data" directory may be different.
This is a problem since the "data" directory stores session information for CantiGUI (like saved jobs), so you will always want to use the same "data" directory every time.
I think I fixed the problem, and now the "data" directory should always be located in the same directory as CantiGUI.jar.

New to version 1.00:
-Initial release
This is the initial release of CantiGUI. There are no custom graphics included in the gui... at all. It looks ugly but should be functional.
When I get time later I will work on making the gui look good.
-Load/Save Jobs
This is a feature not available in the command line version of Canti. It allows you to save a job for future reprocessing.
A job is basically the state of the gui at the time of saving (so it includes things like parent_folder, title, etc.).
Previous jobs are displayed in a table with rows sorted by title.

----------------------------------------------------------------------
-Note from the author-
I wrote this program for fun and for my own personal use, but decided to release it publicly so that all manga/comic lovers could use it.
It works great to process manga for my Kindle DX and iPad. I hope you enjoy!

I HIGHLY recommend using pdf for manga on the Kindle DX.
For the iPad, I recommend cbz manga and a comic reading app. I use ComicZeal, but if I ever end up writing my own iPad comic app I recommend that one instead :P

----------------------------------------------------------------------
-License-
Canti and CantiGUI are Copyright 2010 Andrew Mantel.

Canti and CantiGUI are freeware and can be distributed freely as long as it is not modified.

When you use this software you do so at your own risk.
The author is not responsible for any loss or damage resulting from the use or misuse of this software.

