Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-31-2010, 02:31 PM   #46
lilman
Addict
lilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-books
 
lilman's Avatar
 
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
Here's Canti v1.86

Note: You only need FixProgressFiles if you want to move your manga collection processed with a version of Canti earlier than v1.86 to another operating system.

New to version 1.86:
-Bug fix: Handling multiple naming schemes
Um, most of this is too hard to explain. Here's an easy part: Before, if you used the use_original_filenames option then output_folder image folder restoration was broken.
The rest of the fixes are complicated. It has to do with the case where you output different comic series to the same output_folder (meaning that they all share the same progress file).
This also has to do with mixing the various naming schemes in the same output folder.
Anyway, I think everything works correctly now.
-Improved progress file to make it portable
I ran out of room on the hdd partition where I keep my digital manga collection and so I had to move the collection to an external drive.
In the past Canti would record the absolute paths of image folders already processed in the output_folder progress file. This is a problem if the output folder moves to another directory.
To fix this, Canti now simply records the name of the already processed folders (so School_Rumble_Ch.1 instead of C:\Manga\IPAD\School_Rumble_Ch.1).
This update is backwards compatible with previous progress files.
Note: If you want to move output_folder to another operating system, check out the FixProgressFiles.jar program I uploaded.

Enjoy and let me know if it works for you
Attached Files
File Type: zip Canti_v1.86.zip (85.2 KB, 147 views)
File Type: zip FixProgressFiles.zip (11.0 KB, 100 views)
lilman is offline   Reply With Quote
Old 09-03-2010, 06:39 PM   #47
lilman
Addict
lilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-books
 
lilman's Avatar
 
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
I just wrote a Canti batch file creator. What it does is you run it like:
Code:
java -jar BatchManga.jar [path to manga collection] [path to Canti manga processed output folder]
For example:
Code:
java -jar BatchManga.jar /home/andrew/Manga/ /home/andrew/Manga_IPAD/
It will read all the folders in your manga collection and create a batch file for Canti to process your entire collection. For example, let's say /home/andrew/Manga/ has the following folders:
CandidateForGoddess/
MahouSenseiNegima!/
SchoolRumble/
Since I'm running this on Linux in this case, it will create a shell script called process_all_manga.sh with the following contents:
Code:
#!/bin/sh
java -jar Canti.jar -parent_folder '/home/andrew/Manga/CandidateForGoddess/' -title 'Candidate for Goddess' -manga_prefix "Vol." -output_folder '/home/andrew/Manga_IPAD/Candidate_for_Goddess/'
java -jar Canti.jar -parent_folder '/home/andrew/Manga/MahouSenseiNegima!/' -title 'Mahou Sensei Negima!' -manga_prefix "Ch." -output_folder '/home/andrew/Manga_IPAD/Mahou_Sensei_Negima!/'
java -jar Canti.jar -parent_folder '/home/andrew/Manga/SchoolRumble/' -title 'School Rumble' -manga_prefix "Ch." -output_folder '/home/andrew/Manga_IPAD/School_Rumble/'
Some important things to note from this example:
  • Even though the words in the source manga folder names are all bunched together (example: SchoolRumble) the program knows to expand this out in the title and output folder to "School Rumble" and "School_Rumble" respectively. In other words, the program does a pretty good job of guessing the correct spaces in a title if you don't have them already properly spaced.
  • Source folder "CandidateForGoddess" was interpreted as title "Candidate for Goddess". The program has a built-in list of words that should not be capitalized in a title (in this case, "For"), but I could also make an external file so that the user could set their own list of words that should not be capitalized in titles.
  • Of the three example folders given, only folder "CandidateForGoddess" was given manga_prefix "Vol.", while the other two folders were given manga_prefix "Ch.". The default manga_prefix for this program is "Ch.", but because the "CandidateForGoddess" folder contained a binding file in it, the program gave it the "Vol." manga_prefix instead (since the output is going to use binding).
Thus, you can process your entire manga collection just by executing the batch script. Of course, you'll need to edit the output script a little for small spelling changes (it isn't perfect at determining the proper title), but for the most part this is a huge time save over manually writing out Canti command lines.

The program is currently at a point where I can use it so I'm not planning on spending any more time on it, but if there is interest in it I will continue its development (including Windows support, which should already work but hasn't been tested). So reply if you would like this program.
lilman is offline   Reply With Quote
 
Enthusiast
Old 09-03-2010, 07:12 PM   #48
lanfearl
Member
lanfearl began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Aug 2010
Device: Kindle 3
my skill level has already been presented in this thread but :P

Your program makes the image files a way smaller size than Mangle and some of the other alternatives. Like half the size per image.

Because of the size of the Kindle 3, I need to look pretty closely at some of the text. Your program makes things fuzzier than alternatives.

What setting can I change? Thanks!
lanfearl is offline   Reply With Quote
Old 09-03-2010, 07:57 PM   #49
lilman
Addict
lilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-books
 
lilman's Avatar
 
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
Quote:
Originally Posted by lanfearl View Post
Your program makes the image files a way smaller size than Mangle and some of the other alternatives. Like half the size per image.
Are you talking about file size or image resolution? The default Kindle profile for Canti uses the published screen specs of the Kindle, 800x600px at 167dpi. If you are comparing image resolution to other programs, what settings are they using?

Quote:
Originally Posted by lanfearl View Post
Because of the size of the Kindle 3, I need to look pretty closely at some of the text. Your program makes things fuzzier than alternatives.

What setting can I change? Thanks!
You can try setting width and height to -1, which disables image resizing. This will force the Kindle to do the image resizing at the time of viewing for non-optimal resolution images. Zoomed in images will look better, but I'm not sure if this will increase Kindle processing time. Please let us know how it goes.
lilman is offline   Reply With Quote
Old 09-15-2010, 02:05 PM   #50
lilman
Addict
lilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-books
 
lilman's Avatar
 
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
Here's Canti v1.87

New to version 1.87:
-Bug fix: Disable auto sense manga_prefix when using binding
Auto sense manga_prefix is used to determine the manga_prefix of the currently processing series from a previous processing of the series.
However, this feature cannot discriminate between a manga_prefix and a bind_prefix. This can cause naming problems when using binding (kind of hard to explain... just trust me).
Anyway, I've disabled auto sense manga_prefix when binding is enabled, so problem solved.
-New Other Operation: Analyze Manga Collection
Up until now all of the updates have been either new features or bug fixes, but this is the first "other operation" (think of it as a program embedded in Canti to complement it).
Analyze Manga Collection 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]
See the -Other Operations- section of the readme for more details.
-New Other Operation: Create Canti Batch File
Creates a batch script to process all of the manga series in [path to root input] and output the processed manga to [path to root output].
This will allow you 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]
See the -Other Operations- section of the readme for more details.

Enjoy and let me know if it works for you.
Attached Files
File Type: zip Canti_v1.87.zip (95.4 KB, 149 views)
lilman is offline   Reply With Quote
Old 09-22-2010, 02:57 AM   #51
reduction
Junior Member
reduction began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
I'm trying to use this lovely little program, but I'm getting this error in the Terminal:

ERROR: Cannot unrar archives since Canti couldn't find a compatible unrar program on your system. Please check readme.txt for more details on how to get rar support for Canti.
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
at manga.ConvertManga.getFileNumberSuffix(ConvertMang a.java:570)
at manga.ConvertManga.main(ConvertManga.java:1264)

Any ideas? Java is updated. OS 10.5. Thank you!
reduction is offline   Reply With Quote
Old 09-22-2010, 07:26 AM   #52
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,961
Karma: 4501011
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
You'll need the CLI unrar program. I'm not familiar with this on OS X regarding binary packages, but the source package is here: http://www.rarlab.com/rar/unrarsrc-3.9.10.tar.gz
NiLuJe is offline   Reply With Quote
Old 09-22-2010, 10:28 AM   #53
SunLight
Connoisseur
SunLight began at the beginning.
 
Posts: 82
Karma: 36
Join Date: Jun 2010
Device: none
Would love to see a GUI of this, how do you run it in Windows?
SunLight is offline   Reply With Quote
Old 09-22-2010, 11:45 AM   #54
lilman
Addict
lilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-books
 
lilman's Avatar
 
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
Quote:
Originally Posted by reduction View Post
I'm trying to use this lovely little program, but I'm getting this error in the Terminal:

ERROR: Cannot unrar archives since Canti couldn't find a compatible unrar program on your system. Please check readme.txt for more details on how to get rar support for Canti.
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
at manga.ConvertManga.getFileNumberSuffix(ConvertMang a.java:570)
at manga.ConvertManga.main(ConvertManga.java:1264)

Any ideas? Java is updated. OS 10.5. Thank you!
Quote:
Originally Posted by NiLuJe View Post
You'll need the CLI unrar program. I'm not familiar with this on OS X regarding binary packages, but the source package is here: http://www.rarlab.com/rar/unrarsrc-3.9.10.tar.gz
Thanks for answering that question. Here is a list of unrar executables that Canti looks for on a Mac:
Code:
/usr/bin/rar
/usr/bin/unrar
/usr/bin/unrar-free
/usr/local/bin/rar/rar
I don't have a Mac so I've never been able to test this myself. Please let me know if there is another unrar executable for Mac and I will add the info to Canti.

Quote:
Originally Posted by SunLight View Post
Would love to see a GUI of this, how do you run it in Windows?
I've received requests from others for a GUI as well. I will try to get, at the very least, an extremely basic GUI out. At the moment I am doing research for another project and also working on speeding up Canti (been working on the speed up for a while... very tricky), so it may be some time before a GUI comes out.

For now, to run Canti in Windows you need to:
1) Download the latest version of Canti
2) Unzip it (will give you Canti.jar and readme.txt)
3) Follow the instructions in the readme.txt file. It will explain how to make a default settings file for your ereader device and then how to run Canti.
lilman is offline   Reply With Quote
Old 09-22-2010, 10:55 PM   #55
reduction
Junior Member
reduction began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Quote:
Originally Posted by lilman View Post
Thanks for answering that question. Here is a list of unrar executables that Canti looks for on a Mac:
Code:
/usr/bin/rar
/usr/bin/unrar
/usr/bin/unrar-free
/usr/local/bin/rar/rar
I have unrar installed and I'm not trying to extract images from a .rar, anyway. I have a folder of .jpgs.
reduction is offline   Reply With Quote
Old 09-23-2010, 09:56 AM   #56
lilman
Addict
lilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-books
 
lilman's Avatar
 
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
Ok, a couple of issues here:

1)
Quote:
Originally Posted by reduction View Post
ERROR: Cannot unrar archives since Canti couldn't find a compatible unrar program on your system. Please check readme.txt for more details on how to get rar support for Canti.

...

I'm not trying to extract images from a .rar, anyway. I have a folder of .jpgs.
You are getting the "couldn't find compatible unrar program" even though you aren't dealing with a .rar. I looked through my code and saw that it will print this message even when there is nothing to unrar. This has been fixed and will be included in the next update. This isn't what is causing Canti to crash for you though, it is merely causing that message to display when it shouldn't be.

2)
Quote:
Originally Posted by reduction View Post
I have unrar installed
You got the "couldn't find compatible unrar program" even though you do have an unrar program installed on your system. This means that unrar is installed to a location that Canti doesn't know about (i.e. it isn't in one of the locations I listed in my previous post). If you can, try to find your unrar executable and reply with the path so that I can add it to Canti.

3)
Quote:
Originally Posted by reduction View Post
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
at manga.ConvertManga.getFileNumberSuffix(ConvertMang a.java:570)
at manga.ConvertManga.main(ConvertManga.java:1264)
The "Exception in thread "main" java.lang.NoSuchMethodError" you are getting is very odd. If you can, please pm me a screenshot of your parent_folder directory so that I can see the folder names there and try to figure out why Canti is crashing when trying to determine the suffix of one of them. Alternatively, if you are setting parent_folder to a particular image folder (i.e. parent_folder doesn't contain subfolders, it is simply a folder of images) then just pm or reply with the name of that folder.

Last edited by lilman; 09-23-2010 at 10:00 AM.
lilman is offline   Reply With Quote
Old 09-23-2010, 12:42 PM   #57
vkeios
Junior Member
vkeios began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Quote:
Originally Posted by lilman View Post
If you can, try to find your unrar executable and reply with the path so that I can add it to Canti.
The 3 OS X package managers use /opt/local/bin (Macports), /sw/bin (Fink)*, and /usr/local/bin (Homebrew).

*might be wrong. I've never used Fink. I do know it uses /sw at the very least.

Last edited by vkeios; 09-23-2010 at 12:48 PM.
vkeios is offline   Reply With Quote
Old 09-24-2010, 04:20 PM   #58
badbob001
Evangelist
badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.
 
badbob001's Avatar
 
Posts: 442
Karma: 1028380
Join Date: Sep 2009
Device: Kindle 3 (US 3G)
I was thinking of getting a Kindle 3 and use it to read some manga. I used mangle to convert a sample to the correct portrait resolution and some of the text was borderline legible. I was thinking it may be better to convert the images to match the K3's landscape width resolution so if I can't make out the text in portrait, I can put the Kindle in landscape to get more details.

With your app, what output resolution do you suggest for what I want to achieve? 800x1067? I'm not even sure if it makes sense to be so exact since 1:1 pixel display is probably not possible with the kindle toolbar in the way and the pdf format's scaling feature.

Does your margin cropper have a limiter? I have seen some pages that are 90% white and it would make sense for your cropper to abort or limit itself if it wants to chop off more than maybe 10% all around.

I notice that your app has a feature to sense double pages and automatically split them to two pages if it's not a single image. For lower resolution devices, it may make sense to force all wide pages, even single image ones, to be cut to two pages. To satisfy both sides of the fence, you could do this:

page 04: Wide image rotated (as is done now)
page 05: Left side of wide image
page 06: Right side of wide image

This way, if the rotated wide image is too shrunken to make out the text, the next two pages will offer a closer view of the same page. Then again, you could have an option where rotated wide images are sampled at double than the specified target resolution so we can still zoom in for more details, though I would hate the needed panning.

Sorry if you have already addressed some of these.

Thanks!
badbob001 is offline   Reply With Quote
Old 09-24-2010, 07:11 PM   #59
lilman
Addict
lilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-bookslilman has learned how to read e-books
 
lilman's Avatar
 
Posts: 326
Karma: 960
Join Date: Jul 2009
Location: Florida, US
Device: Kindle DX, iPad
Quote:
Originally Posted by badbob001 View Post
I was thinking of getting a Kindle 3 and use it to read some manga. I used mangle to convert a sample to the correct portrait resolution and some of the text was borderline legible. I was thinking it may be better to convert the images to match the K3's landscape width resolution so if I can't make out the text in portrait, I can put the Kindle in landscape to get more details.

With your app, what output resolution do you suggest for what I want to achieve? 800x1067? I'm not even sure if it makes sense to be so exact since 1:1 pixel display is probably not possible with the kindle toolbar in the way and the pdf format's scaling feature.
Hmm... good question. I would say set width to 800 and height to -1 (which disables height resizing). This should scale the image so that the width fills up the complete landscape view and the height is just resized to whatever matches the original aspect ratio of the image (so you scroll down in landscape mode to view the rest of the height of the page). I think that should work.

Quote:
Originally Posted by badbob001 View Post
Does your margin cropper have a limiter? I have seen some pages that are 90% white and it would make sense for your cropper to abort or limit itself if it wants to chop off more than maybe 10% all around.
No limiter on the white margin cropper. It does stop pretty quickly at the first sign of non-white pixels from all sides of the image. I'm using ImageMagick's built-in border cropper to do the job so there isn't much to be tweaked other than the fuzz level. You can crank the fuzz to 100% if you want minimum border cropping, or you can disable it outright if you are unhappy with it.

Quote:
Originally Posted by badbob001 View Post
I notice that your app has a feature to sense double pages and automatically split them to two pages if it's not a single image. For lower resolution devices, it may make sense to force all wide pages, even single image ones, to be cut to two pages. To satisfy both sides of the fence, you could do this:

page 04: Wide image rotated (as is done now)
page 05: Left side of wide image
page 06: Right side of wide image

This way, if the rotated wide image is too shrunken to make out the text, the next two pages will offer a closer view of the same page. Then again, you could have an option where rotated wide images are sampled at double than the specified target resolution so we can still zoom in for more details, though I would hate the needed panning.
I can add the option to keep the unsplit image and then follow it by the split image pages.

You can already set up the .properties file to split all landscape images regardless if there is a mid-image page split detected. I don't have my computer in front of me right now, but I think you just set the strictness values to 0.

Quote:
Originally Posted by badbob001 View Post
Sorry if you have already addressed some of these.

Thanks!
Np, please feel free to ask any questions.
lilman is offline   Reply With Quote
Old 09-25-2010, 01:30 PM   #60
jeffcobb
Groupie
jeffcobb will become famous soon enoughjeffcobb will become famous soon enoughjeffcobb will become famous soon enoughjeffcobb will become famous soon enoughjeffcobb will become famous soon enoughjeffcobb will become famous soon enoughjeffcobb will become famous soon enough
 
Posts: 152
Karma: 700
Join Date: Sep 2010
Location: Las Vegas
Device: Nook, CoolER
I just found this on a search here; I was all ready to write essentially the same thing for Android. Curious: how did your PDF conversions work out? I have a buttload of Marvel stuff in that format from when they were selling those DVDs with like 600 issues of Spiderman, 500 Ironman, etc. I also have a lot of Battle Angel Alita and Rurouni Kenshin stuff like that I want to convert for Nook....I don't do Windows but can fire up a VM if need be...
jeffcobb is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Canti: Manga Processing Program lilman Workshop 42 04-14-2011 06:52 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
Best for manga eqzitara Which one should I buy? 27 11-19-2007 07:58 AM


All times are GMT -4. The time now is 12:47 PM.


MobileRead.com is a privately owned, operated and funded community.