Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 08-05-2010, 04:37 PM   #16
Mitchi
C-C-C-COMBO BREAKER
Mitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enough
 
Mitchi's Avatar
 
Posts: 51
Karma: 500
Join Date: Aug 2010
Location: Narnia, and the north! Wait, is Narnia Canada?
Device: Jetbook Lite, Droid Eris
Well it's not binding what's in the folders, because there aren't images in there (pdf, cbz and images were the folder names). I only had them there for sorting. I've ben able to work around it just fine by running 1-9, then doing 10-xx, and having all of that done in it's own sepearte bind folder. If I set my Autobind to 5 instead of 4, it works great (4 was just the standard number for most of the manga I have, but there are weird exeptions like Solanin and Air gear).

Also, I'm still not too clear on how to make a bind.txt file for it (by that I mean how is it supposed to be written out?)

Last edited by Mitchi; 08-05-2010 at 04:39 PM.
Mitchi is offline   Reply With Quote
Old 08-05-2010, 05:09 PM   #17
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 Mitchi View Post
Well it's not binding what's in the folders, because there aren't images in there (pdf, cbz and images were the folder names). I only had them there for sorting. I've ben able to work around it just fine by running 1-9, then doing 10-xx, and having all of that done in it's own sepearte bind folder. If I set my Autobind to 5 instead of 4, it works great (4 was just the standard number for most of the manga I have, but there are weird exeptions like Solanin and Air gear).
If you can post a screenshot of the contents of the output_folder (just open it up in a file manager, maximize the window, and hit printscreen) maybe I'll get a better idea of what's going on. You can use a free image upload service like http://imageshack.us/ to upload the screenshot and pm me the link.

Quote:
Originally Posted by Mitchi View Post
Also, I'm still not too clear on how to make a bind.txt file for it (by that I mean how is it supposed to be written out?)
Create an empty text file in parent_folder and name it bind.txt. Each line of the bind file will have a single integer on it representing how many folders will be bound in that binding. The binding is done on all folders in output_folder in alphabetical order. Here's an example:
Let's say I have 20 chapters of School Rumble. There are named School_Rumble_1, School_Rumble_2, ..., School_Rumble_20. If you use auto binding with a size of 5, then you should get the following bindings:
Code:
Binding 1: (first 5 folders)
School_Rumble_1
...
School_Rumble_5

Binding 2: (next 5 folders)
School_Rumble_6
...
School_Rumble_10

... you get the idea. Each successive binding will have the next auto_bind_size number of folders in it.
Let's say I have the same 20 chapters of School Rumble and make a bind.txt file with the following contents:
Code:
3
4
13
In this case, I will get the bindings:
Code:
Binding 1: (the first 3 folders)
School_Rumble_1
School_Rumble_2
School_Rumble_3

Binding 2: (the next 4 folders)
School_Rumble_4
...
School_Rumble_7

Binding 3: (the next 13 folders)
School_Rumble_8
...
School_rumble_20
Does that make sense? Unlike auto binding, a bind file allows you to manually specify the size of each binding. I've attached a bind file that I use for my School Rumble collection. It includes comments that make it easier to read, and you may want use the same style as a bind file can get complicated if you have a lot of chapters to bind yet each line is simply an integer.
Attached Files
File Type: txt bind.txt (497 Bytes, 187 views)
lilman is offline   Reply With Quote
Old 08-06-2010, 11:23 AM   #18
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 what I'm working on for Canti v1.85:

-[completed] Bug fix: @manga_prefix not working properly
-[completed] Bug fix: Auto binding not working properly
-[completed] Bug fix: Binding will bind the wrong folders
-[completed] User can specify location of .properties file
-[completed] Add default .properties profiles for JetBook and JetBook Lite
-[completed] Add support for spaces in paths

I figured out why spaces in paths were not working. It has to do with the way Java calls external programs (ImageMagick and rar handlers). I finally got a spaces in paths sample to work through hardcoding, now I have to figure a way to handle this in general.

-Update-
Got spaces in paths working for rar operations (well, they're working on Linux anyway, I still need to test on Windows). Adding spaces in paths support for ImageMagick operations will take some time as there is a lot of code that needs to be rewritten. For anyone interested, here is the issue explained from a programming perspective: http://forums.sun.com/thread.jspa?th...558623&start=0

-Update 2-
I think I finally got spaces in paths working for all of Canti. I still need to test it in Windows, but it works perfectly in Linux. What a pain that was, at least I learned some new stuff.

Last edited by lilman; 08-09-2010 at 07:04 PM.
lilman is offline   Reply With Quote
Old 08-06-2010, 11:29 AM   #19
Mitchi
C-C-C-COMBO BREAKER
Mitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enough
 
Mitchi's Avatar
 
Posts: 51
Karma: 500
Join Date: Aug 2010
Location: Narnia, and the north! Wait, is Narnia Canada?
Device: Jetbook Lite, Droid Eris
Here's what I meant about the folders. Basically, it tries to bind the first (5 in this case) folders it finds, hence cbz, pdf, images and Solanin 1 as the first one, then solanin 2 as the second volume (this is with autobind 4, converting 5 chapters).

Since there's no images in the first three, it only shows up as Solanin 1 in volume 1.
Attached Thumbnails
Click image for larger version

Name:	folders.jpg
Views:	295
Size:	13.1 KB
ID:	56261  
Mitchi is offline   Reply With Quote
Old 08-06-2010, 01:19 PM   #20
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 Mitchi View Post
Here's what I meant about the folders. Basically, it tries to bind the first (5 in this case) folders it finds, hence cbz, pdf, images and Solanin 1 as the first one, then solanin 2 as the second volume (this is with autobind 4, converting 5 chapters).

Since there's no images in the first three, it only shows up as Solanin 1 in volume 1.
Oh, now I see the problem. Canti assumes that everything in output_folder was created by Canti, meaning that all folders located there are image folders. Since you created your own folders in output_folder, Canti doesn't know how to handle them. I'll see if I can add code to handle your case, but I'm not sure if it will be possible.

-Update-
I think I fixed the code, although I need to test it more.

Last edited by lilman; 08-07-2010 at 12:45 PM.
lilman is offline   Reply With Quote
Old 08-07-2010, 03:29 PM   #21
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.85

New to version 1.85:
-Bug fix: @manga_prefix not working properly
If you set @manga_prefix to default, Canti interpreted it literally (meaning you would get something like School_Rumble_-_default1.cbz). This has been fixed.
Also, the auto setting for @manga_prefix wasn't working correctly. I think it has been fixed now.
-Bug fix: Auto binding not working properly
This problem is hard to explain. Just know that auto binding was a little bit broken but has been fixed.
-Bug fix: Binding not working properly
Binding was considering all folders in output_folder as potential folders to bind when it should have only considered image folders of the currently processing series. This has been fixed.
-Added support for spaces in paths
Spaces in paths has been a pita since the beginning of Canti. I finally tracked down the cause of the problem (it was an issue with the way Java interacts with external programs like ImageMagick) and it has been fixed.
Remember that when specifying a path with spaces you must put "" around the path (for example: -parent_folder "C:\\Program Files\\manga\\").
-User can specify location of .properties file
I got some requests for this feature, and since it took ~3mins to program I added it in :P
New command line option -properties [path to .properties file] allows you to specify the location of the .properties file.
By default, Canti assumes that the .properties file is in the same directory as the .jar, so if you haven't moved the .properties file from its default location then you don't need to set this option.
-Added more default .properties profiles
Added requested .properties profiles for Ectaco JetBook and JetBook Lite. They can be created by running (respectively):
Code:
java -jar Canti.jar -create_properties jb
java -jar Canti.jar -create_properties jbl
Currently, the JetBook regular and lite version settings are the same, but Canti still handles them separately in case their specs change in the future.
-User can specify -auto_bind [integer] in command line
This should make it easier to use auto binding as needed since I doubt most people like to leave it enabled all the time.
This value supersedes the one in the .properties file.

Enjoy and let me know if it works for you
Attached Files
File Type: zip Canti_v1.85.zip (82.8 KB, 230 views)
lilman is offline   Reply With Quote
Old 08-08-2010, 01:37 PM   #22
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 Mitchi View Post
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...

:<
I see the problem now, what Mitchi posted is how the Java built-in sorting algorithm order files with that naming scheme. I will see if I can find a way to fix this.

-Update-
I think I fixed the bind ordering problem. I ended up writing my own comparator to sort the image folders by suffix number. After some more testing I will release the update.

Last edited by lilman; 08-09-2010 at 11:53 AM.
lilman is offline   Reply With Quote
Old 08-09-2010, 01:30 PM   #23
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.85a

New to version 1.85a:
-Bug fix: Binding may be ordered incorrectly
I was relying on Java's built-in sorter to sort bindings alphabetically, but this wasn't always working properly. For example, if you had:
School_Rumble_Ch.1
School_Rumble_Ch.2
...
School_Rumble_Ch.10
It would sort as:
School_Rumble_Ch.1
School_Rumble_Ch.10
School_Rumble_Ch.2
...
I think the problem was that Java's built-in sorter couldn't tell that Ch.10 refers to the number "10", not ".10".
Anyway, I wrote my own comparator so the sorting problem should be fixed.
-Bug fix: Zipping could cause a "Too many open files" exception
The zipping algorithm (used to zip an image folder into a .zip/.cbz archive) left file streams open, which could potentially cause a "Too many open files" exception, crashing the program. This has been fixed.
-User can specify -use_original_filenames [true or false] in command line
If enabled (-use_original_filenames true) then the output files will have the same filenames as the source files.
This value supersedes the one in the .properties file.

Enjoy and let me know if it works for you
Attached Files
File Type: zip Canti_v1.85a.zip (84.4 KB, 262 views)
lilman is offline   Reply With Quote
Old 08-09-2010, 05:09 PM   #24
Mitchi
C-C-C-COMBO BREAKER
Mitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enoughMitchi will become famous soon enough
 
Mitchi's Avatar
 
Posts: 51
Karma: 500
Join Date: Aug 2010
Location: Narnia, and the north! Wait, is Narnia Canada?
Device: Jetbook Lite, Droid Eris
Awesome, the autobind appears to be working perfectly now.

Also, thanks for the settings for the jetbook.
Mitchi is offline   Reply With Quote
Old 08-11-2010, 04:48 PM   #25
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 Mitchi View Post
Awesome, the autobind appears to be working perfectly now.
Good to hear. As far as I know, that was the last bug that needed ironing out, so hopefully I won't need to work on Canti anymore.

Quote:
Originally Posted by Mitchi View Post
Also, thanks for the settings for the jetbook.
Np. If anyone has requests for any other device to be added to Canti just send me a pm with the device name and a link to a web page with the device specs (like screen width and height in pixels, max dpi, supported formats, etc.). Adding a device profile to Canti only takes me a few minutes.
lilman is offline   Reply With Quote
Old 08-19-2010, 10:38 PM   #26
SleazyC
Junior Member
SleazyC began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2010
Device: Graphite Kindle DX
Can't get this to work on Mac OSX 10.5. Errors out saying it cannot find rar installed:

Code:
Using these settings stored in /Users/Downloads/Manga/Canti/Canti.properties:
  width (in pixels):  824
  height (in pixels): 1200
  maximum dpi: 150
  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
  use original filenames: false
  archive input image folders: false
  delete output image folders: false
  image format: .jpg
  kindle bookmark: true
  comic zeal naming: false
  ImageMagick home directory: /opt/local/bin/

Testing rar handler...
  Can unrar: false
  Can rar: false

    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.
When rar is installed:

Code:
$ which rar
/usr/bin/rar
$ which unrar
/usr/bin/unrar
SleazyC is offline   Reply With Quote
Old 08-20-2010, 08:14 AM   #27
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 SleazyC View Post
Can't get this to work on Mac OSX 10.5. Errors out saying it cannot find rar installed:

When rar is installed:

Code:
$ which rar
/usr/bin/rar
$ which unrar
/usr/bin/unrar
I don't have a Mac so I was basing the default rar executable location off of what I found in a Google search (/usr/local/bin/rar/rar). I'll add in the same search as I do for Linux.
lilman is offline   Reply With Quote
Old 08-20-2010, 08:30 AM   #28
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.85b

Note: Only Mac users need to pick up this update.

New to version 1.85b:
-Improved finding rar/unrar on Mac
Improved the rar/unrar finding algorithm for Mac. It will now also look in the same places as it does for Linux.

Enjoy and let me know if it works for you
Attached Files
File Type: zip Canti_v1.85b.zip (84.4 KB, 215 views)
lilman is offline   Reply With Quote
Old 08-31-2010, 02:28 PM   #29
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, 296 views)
File Type: zip FixProgressFiles.zip (11.0 KB, 206 views)
lilman is offline   Reply With Quote
Old 09-03-2010, 02:52 PM   #30
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
Reply


Forum Jump

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


All times are GMT -4. The time now is 08:03 PM.


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