07-07-2010, 01:57 PM | #1 |
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
Canti: Manga Processing Program
(visit http://www.bitcake.com/ for latest version, now available with a gui!)
(this feature list applies to the latest version of Canti, the versions in this thread will not have all these features) -Feature List- +Image processing: -Scale width/height (always maintains original aspect ratio) +Supported input sources:-Auto trim white space around a scan -Auto chop white rows and columns within a scan -Auto rotate scans to desired landscape/portrait orientation -Full color, grayscale, or grayscale color table -Specify # of colors -Change source image format -Add border after processing to fill specified width/height -Reduce to maximum dpi -Single folder of images +Supported input image formats:-Single .zip/.cbz -Single .rar/.cbr (Note: Must have compatible unrar program installed on your system. See readme for details) -Single .pdf -A folder/archive containing any number of the above items, allowing you to process an entire manga series with one command. -Pretty much anything that ImageMagick supports. It’s safe to assume that all major image formats are supported: .jpg, .bmp, .gif, .png, etc… +Supported output formats:-Folder of images (any image format supported by ImageMagick should be ok) +Binding-.zip/.cbz -.rar/.cbr (Note: Must have compatible rar program installed on your system. See readme for details) -.pdf (including right-to-left page ordering) -.epub (including right-to-left page ordering) -Binding allows you to combine multiple input sources into a single output +Auto split landscape 2-page scans-Three ways to use binding: -Auto bind chapters into volumes based on interpreted volume-chapter info -Auto bind groups of a specified size -Create a bind file to manually specify which chapters to bind into a single volume -Can detect whether a landscape scan contains two separate pages and split them accordingly +Volume-chapter interpretation:-Tries not to split landscape 2-page scans where the two pages form one big image -Automatically interpret volume-chapter info from sources +Generate a settings file for a variety of ereader devices-Bind chapters of the same volume (and create a fake volume binding for the latest chapters not yet released in tankobon) -Supports a large variety of source organization, including: -Nested folders/archives/pdfs -Determine volume from parent hierarchy -Determine volume from observed bounds of a volume’s chapters -Detect special chapters and a/b chapters -Conflict resolution (both automatic and manual) when multiple sources map to the same volume-chapter -Optimal settings stored for many of the top ereader devices: +Multithreading:-Amazon: kdx, k3, k2, k1 -Can also generate a default settings file if Canti doesn’t know the optimal settings for your particular ereader device-Apple: ipad -B&N: nook -Sony: prs-900, prs-700, prs-650, prs-600, prs-505, prs-500, prs-300 -iRex: iliad, dr800, dr1000 -Ectaco: jb, jbl -Kobo: kobo2, kobo1 -Any setting can be changed by the user to meet his/her needs -Mixed folder/image-level multithreading, allowing you to process multiple folders and images in parallel +Other operations:-Automatically determines the number of threads to use based on detected cpu cores and workload (you can also manually specify the number of threads) -Organize: organizes manga collection by interpreting volume-chapter info without processing images +Job management (available in the GUI only):-Analyze manga collection: returns statistics such as # of file types, # scans, file space usage, etc. -Analyze manga folder: returns statistics such as width, height, and dpi of each image in the folder -Create Canti batch file (available in the CLI only): creates a script to process your entire manga collection using Canti -Save a job so that you can run it again later (useful if you have added new chapters to a series) Read the included readme.txt for installation and usage instructions. Enjoy and let me know if it works for you (visit http://www.bitcake.com/ for latest version, now available with a gui!) Last edited by lilman; 05-30-2011 at 02:37 PM. |
07-14-2010, 04:38 PM | #2 |
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
Hehe, how many times is this thread going to be moved around? This started in the iRex forum, but I guess they weren't interested in it... oh well.
Anyway, here's Canti v1.82 Note from the author: I tested this version on my entire digital manga collection, so I can confirm this is a very stable release. New to version 1.82: -Improved image handling stability ImageMagick is a whole lot better at handling images than native Java libraries, so I've added in a preprocessing stage to let ImageMagick fix any weird data within images before letting Java take a whack at them. Currently, Java image handling is only used for landscape 2-page split detection. In case Java still has trouble interpreting an image after ImageMagick has processed it, Canti will simply ignore trying to split that scan (in the past, Canti would have crashed). -Bug fix: @del_output_image_folders didn't always work correctly in Windows Geez, I thought I fixed this before, but it still occasionally fails to delete an output folder on Windows machines. I added in one more layer of defense. After that, if there is still a folder left in the output directory, you can delete it yourself :P -Improved auto sense suffix I changed the naming scheme of auto sense suffix to make it better able to handle reprocessing a manga series. Before, auto sense suffix would expand all suffix names to match the length of the longest suffix. For example: Random_Manga_-_Ch.001 <-- added two extra 0's to match longest length of three Although this makes the filenames line up nicely, it can be a problem if you add manga to your collection and the longest suffix length changes.... Random_Manga_-_Ch.015.5 <-- added an extra 0 to match longest length of three (decimal and characters after the decimal don't count towards length) ... Random_Manga_-_Ch.100 <-- longest length (three characters) The new auto sense suffix method is to make each suffix as short as possible. For example: Random_Manga_-_Ch.1 In this way, if the length of the longest suffix changes, the filenames will not be affected (and thus you won't have to worry about reprocessing the same manga using a different name).... Random_Manga_-_Ch.15.5 ... Random_Manga_-_Ch.100 If you want to fix the suffixes of manga processed with previous version of Canti to match the new naming scheme, you can use the attached FixSuffixes tool. Just run: java -jar FixSuffixes.jar [path to processed manga folder] For example: java -jar FixSuffixes.jar C:\\Manga\\SchoolRumble\\ Will only take an instant to rename all the files in the specified folder to the new naming scheme. Enjoy and let me know if it works for you Last edited by lilman; 07-14-2010 at 06:10 PM. |
Advert | |
|
07-21-2010, 11:36 AM | #3 |
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
Here's Canti v1.83
New to version 1.83: -Bug fix: Potential crash when trying to determine the file extension of a file with no extension Oops, left the potential for a NullPointerException if Canti tries to determine the extension of a file which has no extension. Problem has been fixed. -Bug fix: Can't create .properties file for certain Sony devices Canti had the incorrect filenames for the default .properties files of several Sony devices. This was easily fixed. -Auto sense suffix length In the last release of Canti, the naming scheme for auto sense suffix changed (see the notes for v1.82 for details). I've added @auto_sense_suffix_length for those that preferred the previous auto sense suffix naming scheme. @auto_sense_suffix_length is the number of digits to use when auto sensing the suffix of folders. An auto sensed suffix whose length is less than this value will be padded with leading 0's. The length of a suffix is the number of digits before the decimal. For example, 1.999 has a length of one, 01.999 has a length of two. Acceptable values: -1 (to disable), or an integer greater than or equal to 1 Recomended: -1 (if you don't want to pad the auto sensed suffix) or 4 (if you want to pad, 4 digits should be enough to handle most series (how many series have more than 9999 issues?)) This is set up in the .properties file. Enjoy and let me know if this works for you |
07-21-2010, 03:10 PM | #4 |
Connoisseur
Posts: 83
Karma: 10
Join Date: Jun 2010
Device: Kobo Aura H20
|
Sorry it seems not working... maybe I've done something wrong:
Code:
F:\Documents and Settings\Administrator.TESTSP3\My Documents\Downloads\Canti_v1. 83>java -jar Canti.jar -parent_folder "E:\\Fumetti\\Identity Crisis\\1" -title " Crisi" Using these settings stored in Canti.properties: width (in pixels): 600 height (in pixels): 800 maximum dpi: 170 auto trim: true trim fuzz: 15% auto rotate: true color mode: grayscale num colors: 256 pdf chapters: true pdf r to l: false archive chapters: false epub chapters: false auto bind: false auto split landscape scans: true split right page first: true allow auto split color scans: false auto split gray strictness: 0.8 auto split color strictness: 0.9 auto sense landacape folders: true manga prefix: auto archive input image folders: false delete output image folders: true image format: .jpg kindle bookmark: false comic zeal naming: false ImageMagick home directory: F:\Program Files\ImageMagick-6.6.3-Q16\ Testing rar handler... Can unrar: true Can rar: true parent_folder E:\Fumetti\Identity Crisis\1 is a directory that did not contain a ny subfolders, so running in single folder mode. Copying files to new folders... Converting all manga scans using ImageMagick... Processing folder: Crisi_-_1... Exception in thread "main" java.lang.NumberFormatException: empty String at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang.Double.parseDouble(Unknown Source) at common.image.ImageMagick.getImageData(ImageMagick.java:166) at common.image.ImageMagick.processImage(ImageMagick.java:112) at manga.ConvertManga.main(ConvertManga.java:1514) I've to manually extract the cbr because it had a folder inside and Canti says "there was no image on it", but they were Maybe there some character conversion too the title (in italian) is "Crisi di Identità" the "à" is (in the windows command prompt at least) a sort of "alpha" letter... JAVA does not use "UTF-8"? |
07-22-2010, 07:21 PM | #5 |
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
fanoI, try renaming the parent_folder path to not include any spaces. For example:
Code:
java -jar Canti.jar -parent_folder "E:\\Fumetti\\Identity_Crisis\\1" -title "Crisi" |
Advert | |
|
07-27-2010, 10:11 AM | #6 |
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
Here's Canti v1.84
New to version 1.84: -Use original filenames Canti uses -title, -manga_prefix, and a suffix (either auto sensed or size specified by -num_chars_keep_suffix) to form the output filenames. The basic naming scheme is: [title]_-_[manga_prefix][suffix], for example: School_Rumble_-_Ch.1 @use_original_filenames allows you to use the original filenames of the source manga as the output filenames. This can be especially useful if your source files are not named in a way that auto sense suffix can handle (i.e. they don't end with the chapter or volume number). This option supersedes the default of using auto sense suffix but can be disabled at runtime by specifying -num_chars_keep_suffix [integer] This is set up in the .properties file. Enjoy and let me know if it works for you |
07-28-2010, 06:12 AM | #7 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jun 2008
Device: PRS-650
|
Thank you!
Really nice program, I'm actually using it however I have a couple suggestions: 1) Spaces into filenames is really an ugly bug and I'm quite sure there's some way java can handle them, for example with bash you should enclose filenames variables in "" (see below). 2) Would be great to have some command line option more, like one for where to find the profile file and some for the most used parameters like width/dpi/colors 3) Resize is great but not if page is already smaller than values given, imagemagick has an option to "Only Shrink Larger Images" that's like : "-resize 64x64\>" where the "\>" tells imagemagick to only shrink.... it's already used? (I found it here) For now I'm using it through linux and this is my bash script to bypass spaces issue, need to customize CANTIDIR and then converts pdf into cbz: Code:
CUR=$(pwd) #Select here the directory where you put Canti.jar and profile file CANTIDIR="/mnt/xmedia/ecomics/Canti" ALPHA=$(basename "$1") BETA=${ALPHA%%.*} GAMMA=temp ZETA=$(dirname "$1") cd "$ZETA" TETA="${ALPHA// /_}" ETETA="${TETA%%.*}" mkdir temp if [ "x$2" == "x" ]; then convert "$1" "temp/%04d.jpg" else convert -density $2 "$1" "temp/%04d.jpg" || exit 1 fi cd "$CANTIDIR" java -jar "Canti.jar" -parent_folder "$ZETA/temp" -title "$ETETA" mv "$ZETA/OUT/$ETETA.cbz" "$ZETA/" rm -rf "$ZETA/OUT" rm -rf "$ZETA/temp" Last edited by mattepiu; 07-28-2010 at 08:22 AM. |
07-28-2010, 12:33 PM | #8 | |||
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
Quote:
Quote:
-Edit- I've coded this feature, it will be included in the next release. I think an early version of Canti had more command line options, but I removed them because I try to keep things as simple as possible for non-technical users. Because this program is designed to process manga for a specified ereader device, the average user shouldn't need to adjust values at runtime like width, height, ... basically anything that is under the ImageMagick keys section of the .properties file. Quote:
Last edited by lilman; 07-28-2010 at 05:18 PM. |
|||
08-03-2010, 04:39 AM | #9 |
C-C-C-COMBO BREAKER
Posts: 51
Karma: 500
Join Date: Aug 2010
Location: Narnia, and the north! Wait, is Narnia Canada?
Device: Jetbook Lite, Droid Eris
|
Thanks for this!
Seems like a "no duh" here but though I'd mention: This won't work if Java Development kit isn't installed, since the java command in Cprompt won't do anything. Don't ask why Java wasn't on the computer I was using. For anyone having trouble with this (basically the java command does nothing in Cprompt): http://www.cs.princeton.edu/introcs/...ndows-cmd.html That being said, what setting would you recommend for for Jet Book Lite? |
08-03-2010, 09:34 AM | #10 | ||
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
Quote:
Quote:
Code:
java -jar Canti.jar -create_properties default Code:
width = 480 height = 640 max_dpi = 160 archive = false -Edit- I added the default .properties profiles for JetBook and JetBook Lite. They will be included in the next release of Canti. If anyone else has an ereader request, just point me to a web page with the ereader specs (width/height, dpi, supported formats, etc.) and I'll add the .properties profile for it to Canti. Last edited by lilman; 08-03-2010 at 12:04 PM. |
||
08-03-2010, 09:27 PM | #11 |
C-C-C-COMBO BREAKER
Posts: 51
Karma: 500
Join Date: Aug 2010
Location: Narnia, and the north! Wait, is Narnia Canada?
Device: Jetbook Lite, Droid Eris
|
So far, it's worked good now that I've gotten the hang of using it, but so far, it's not wanting to process cbr files. I was testing it on a collection of deadpool comics, and while the cbz files were fine, the cbrs just didn't process.
Code:
C:\Canti_v1.84>java -jar canti.jar -parent_folder c:\manga -title "Deadpool" -ou tput_folder c:\done Using these settings stored in Canti.properties: width (in pixels): 600 height (in pixels): 800 maximum dpi: 170 auto trim: true trim fuzz: 15% auto rotate: true color mode: grayscale num colors: 256 pdf chapters: true pdf r to l: false archive chapters: true archive format: .cbz epub chapters: false auto bind: false auto split landscape scans: true split right page first: true allow auto split color scans: false auto split gray strictness: 0.8 auto split color strictness: 0.9 auto sense landacape folders: true manga prefix: auto use original filenames: false archive input image folders: false delete output image folders: false image format: .jpg kindle bookmark: false comic zeal naming: false ImageMagick home directory: C:\Program Files\ImageMagick-6.6.3-Q16\ Testing rar handler... Can unrar: true Can rar: true Extracting archives in -parent_folder... Found 5 rar archives, extracting to temporary folders... parent_folder c:\manga is a directory that did not contain any subfolders, so ru nning in single folder mode. Ignoring folder c:\manga because it has no image files. Copying files to new folders... Converting all manga scans using ImageMagick... Finished. Total time: 0 secs |
08-04-2010, 05:00 PM | #12 | |
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
Quote:
Code:
Testing rar handler... Can unrar: true Can rar: true Would it be possible for you to upload one or more of those .cbr files? This is kinda hard to debug without having them in front of me. You can use a free file service like megaupload.com and then pm me the download link (don't post the link here as comics are copyrighted... I'll delete it once I'm done testing). Last edited by lilman; 08-04-2010 at 05:02 PM. |
|
08-04-2010, 08:35 PM | #13 |
C-C-C-COMBO BREAKER
Posts: 51
Karma: 500
Join Date: Aug 2010
Location: Narnia, and the north! Wait, is Narnia Canada?
Device: Jetbook Lite, Droid Eris
|
I found something of a bug, I think.
When you set the program to auto bind, it looks at ALL the folders in the output folder, but binds from however many folders you had in the input. Example: I have, in my output folder, three folders that I sort things into when I finish binding. So i have: -cbz -images Let's say i am adding 5 folders to convert, but I have auto bind set to 4. This puts in my output folder: -cbz -images -test_-_1 -test_-_2 -test_-_3 -test_-_4 -test_-_5 When the program binds, it looks for 5 folders, but not the 5 it just converted, so it tries to bind together: -cbz -images -test_-_1 then for volume 2, it has -test_-_2 Since it only converted 5 manga, Test 3-5 were completely ignored (6, 7, and 8 as far as folder numbers were concerned) I noticed this when I tested it and had something that was alphabetically before test, so vol.1 was a manga that was already in the folder. If there's no other folders in the output folder, it works perfectly fine. |
08-04-2010, 09:14 PM | #14 |
C-C-C-COMBO BREAKER
Posts: 51
Karma: 500
Join Date: Aug 2010
Location: Narnia, and the north! Wait, is Narnia Canada?
Device: Jetbook Lite, Droid Eris
|
oh, another thing. Since it takes out the zeros in numbering...
Beginning binding... Binding folders: Solanin_-_1 Solanin_-_10 Solanin_-_11 Solanin_-_12 to form Solanin_-_Vol.1... :< |
08-05-2010, 02:44 PM | #15 | ||
Addict
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
|
Quote:
Quote:
I'll look into this. I sort alphabetically using the Java built-in Collections class, but I'm pretty sure that should handle the case you mentioned correctly. |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My Manga Program | lilman | Kindle Developer's Corner | 177 | 07-10-2011 07:39 PM |
Canti: Manga Processing Program | lilman | Apple Devices | 55 | 04-14-2011 05:50 PM |
Classic Canti: Manga Processing Program | lilman | Barnes & Noble NOOK | 4 | 07-14-2010 04:45 PM |
Canti: Manga Processing Program | lilman | Sony Reader Dev Corner | 1 | 07-14-2010 04:43 PM |
Perl processing | alexxxm | Sony Reader | 3 | 11-26-2007 06:13 AM |