Skip to content

Instantly share code, notes, and snippets.

@paddykontschak
Created July 27, 2012 03:43
Show Gist options
  • Save paddykontschak/3186072 to your computer and use it in GitHub Desktop.
Save paddykontschak/3186072 to your computer and use it in GitHub Desktop.
My MangAI Settings
# MangAI v1.06
# These settings are already optimized for kindle3, but feel free to change whatever you like.
# Basic Image Processing Settings
# @width Width in pixels of output images
# Set to -1 to disable width resizing.
# Acceptable values: -1 (to disable) or an integer greater than 0 (to enable)
# @height Height in pixels of output images
# Set to -1 to disable height resizing.
# Acceptable values: -1 (to disable) or an integer greater than 0 (to enable)
# @max_dpi Maximum supported dpi of output images.
# Images with a dpi greater than this value will be downsampled, while images with a lower dpi will not be altered.
# Set to -1 to disable dpi alteration.
# Note that dpi does not matter when dealing with images on an ereader, so only enable this feature if you plan on printing.
# Acceptable values: -1 (to disable) or an integer greater than 0 (to enable)
# @auto_trim Determines whether to auto trim the white space around the edges of the manga pages
# Acceptable values: true, false
# Recommended: true
# @trim_color If @auto_trim is enabled, this is the color that should be trimmed.
# If you set this value to original, then the trimming algorithm will trim whatever color it encounters first.
# Acceptable values: original, white, black, #[hex color code] (for example: #000000)
# Recommended: white
# @trim_fuzz If @auto_trim is enabled, this is the fuzz value to use when autotrimming.
# Acceptable values: An integer between 0 and 100, inclusive
# Recommended: 15
# @trim_cancel If @auto_trim is enabled, this determines at what percentage of pixel loss should autotrimming be cancelled.
# For example, if @trim_cancel is set to 0.6, then autotrimming will be cancelled if 60% of the original pixels would be trimmed away.
# Acceptable values: A decimal between 0 and 1.0, inclusive. Set to -1 to disable trim_cancel.
# Recommended: 0.7, or -1 (to disable trim cancelling)
# @add_border Determines whether to add borders to images smaller than the desired size.
# Acceptable values: true, false
# @add_border_color If @add_border is enabled, this specifies the color to use for the added border.
# Acceptable values: white, black, gray, #[hex color code] (for example: #000000)
# @auto_rotate Determines whether to automatically rotate scans to match the specified geometry.
# For example, if you set @width to 600 and @height to 800, then landscape scans will be rotated to portrait.
# If @width and/or @height is set to -1, then target orientaiton is assumed to be portrait.
# Acceptable values: true, false
# Recommended: true
# @color_mode Type of colors to use for output images.
# Acceptable values: grayscale, full, table
# Recommended: table (if using a non-color device with a limited number of gray levels), grayscale (if using a non-color device), or full (if using a color device)
# @num_colors Number of colors to use for output images. The smaller the number, the smaller the file size, but this can also decrease image quality.
# Acceptable values: An integer between 8 and 256 inclusive, or -1 to disable color reduction.
# If you set @color_mode to table, then this value represents which color table should be used during processing (acceptable values: 4, 8, 16).
# Recommended: 4, 8, or 16 (if @color_mode = table), 256 (if @color_mode = grayscale), -1 (if @color_mode = full)
# @image_format Determines whether to force output images to be a certain type, or to just leave the image type unmodified.
# Most devices should at least support .png, .gif, and .jpeg.
# If your source images are not one of one of these supported types, then you can use this setting to force the image format.
# Acceptable values: original, .jpeg, .gif, .png, .bmp, .tiff, and pretty much any image format accepted by ImageMagick.
# Recommended: .png
# Note that if you set this value to original, then the converted images will be of the same type as the original images.
width = 900
height = 1300
max_dpi = -1
auto_trim = true
trim_color = white
trim_fuzz = 15
trim_cancel = 0.7
add_border = true
add_border_color = white
auto_rotate = true
color_mode = table
num_colors = 16
image_format = .png
# Output Settings
# @pdf Determines whether to create a pdf out of each chapter of manga.
# Acceptable values: true, false
# Recommended: true (I think the Kindle DX handles pdfs much better/faster than images)
# @pdf_r_to_l If this is turned on then the ordering of the pdf pages (and binding, if enabled) will be from right to left (just like a real manga book).
# Acceptable values: true, false
# @archive Determines wheter to create an archive of each chapter of manga.
# Acceptable values: true, false
# @archive_format If you set @archive to 'true', determines what extension to use for the archived files.
# Acceptable values: .zip, .cbz, .rar, .cbr
# @epub Determines wheter to create a epub out of each chapter of manga.
# Acceptable values: true, false
# @epub_r_to_l If this is turned on then the ordering of the epub pages (and binding, if enabled) will be from right to left (just like a real manga book).
# Acceptable values: true, false
# @auto_bind Determines whether to use auto binding, which will automatically bind folders into bindings.
# Note that if there is a bind.txt file present, the program will use that instead, even if auto_bind is turned on.
# Acceptable values: true, false
# @auto_bind_size Number of folders to use when auto binding.
# If set to "auto" then the binds will be determined automatically based on interpreted volume information.
# Acceptable values: auto, any integer greater than 1
# @auto_bind_false_volumes If @auto_bind is enabled and @auto_bind_size is set to auto, then this determines whether chapters without volume information should be bound.
# A fake volume binding will be created for each grouping of chapters without volume info where the chapters are within 1 number distance of each other (for example, c5, c6, c6.5, c7, c8).
# Fake volumes names start with "A" and increment to "B", "C", etc.
# Acceptable values: true, false
# @del_output_image_folders Determines whether to delete the processed image folders from the output folder once processing is done.
# Output image folders are usually saved in case you have to process your manga again (it saves you time by not reprocessing already processed images).
# Note that deletion of output folders can only be enabled if you also turn on zip (the zip files will be used to restore the image folders if you choose to reprocess your manga).
# Acceptable values: true, false
# @page_filename_length The number of digits to use when renaming pages.
# Acceptable values: an integer greater than or equal to 1
# Recommended: 6
# @output_base_folder Location for output of processed manga. This value is used if the user does not specify -output_folder at runtime.
# 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. If you include spaces they will be replaced by underscores.
# @output_prefix Prefix placed before every output publication filename.
# Leave blank if you don't want to use a prefix.
# Supported shorthand:
# [title] - manga series title specified by user at runtime
# Examples:
# If set to "[title]~", output files will look something like "School_Rumble~School_Rumble_-_v1_c1-10.cbz".
pdf = false
pdf_r_to_l = false
archive = false
archive_format = .cbz
epub = false
epub_r_to_l = false
auto_bind = true
auto_bind_size = auto
auto_bind_fake_volumes = true
del_output_image_folders = false
page_filename_length = 6
output_base_folder = default
output_prefix =
# Artificial Intelligence Settings
# @folder_interpretation Determines the way MangAI interprets and sorts source folders/archives/pdfs.
# If set to mpm, then MangAI will conform to the Manga Publication Model and automatically parse volume-chapter information from filenames.
# If set to string, then MangAI will use the source filenames for character-by-character comparison sort.
# Acceptable values: mpm, string
# Recommended value: mpm
# If you specify -folder_interpretation in the command line at runtime, that value will supersede the value in the .properties file.
# @scan_interpretation Specifies how scans (i.e. images) should be sorted.
# If set to msm, then MangAI will conform to the Manga Scan Model. This means MangAI will interpret information such as volume, chapter, and page number for each scan, then sort them appropriately. See readme for more details.
# If set to string, then MangAI will sort scans using character-by-character filename comparisons. This is the method used by practically all comic processors and readers.
# Acceptable values: msm, string
# Recommended: msm
# @lettered_chapter_to_number If enabled then lettered chapter filenames will be converted to numbers (example: c10a -> c10.01).
# This is useful for readers which do not conform to the Manga Publication Model (i.e. readers that only know how to sort numbers).
# Acceptable values: true, false
# Recommended: As far as I know, no reader conforms to MPM yet. When I write my own reader this won't be an issue anymore, but for now you probably want this set to true.
# @volume_buffer_length If @folder_interpretation is set to mpm, this determines the number of leading 0's to pad each detected volume number.
# The length of an a number 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
# Recommended: only enable this if your ereader requires it for proper ordering of files, otherwise leave it disabled
# @chapter_buffer_length If @folder_interpretation is set to mpm, this determines the number of leading 0's to pad each detected chapter number.
# The length of an a number 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
# Recommended: only enable this if your ereader requires it for proper ordering of files, otherwise leave it disabled
# @display_folder_interpretation If enabled then the folder-level interpretation, as determined by @folder_interpretation, will be displayed on screen.
# Each source folder will be displayed on its own line in ascending order of sort, starting with the first folder, along with MangAI's interpretation of that folder.
# This can help you see if there are any problems with the @folder_interpretation method you chose.
# Acceptable values: true, false
# @display_scan_ordering If enabled then the scan ordering, as determined by @scan_interpretation, will be displayed on screen.
# Each scan filename will be displayed on its own line in ascending order of sort, starting with the first scan.
# This can help you see if there are any problems with the @scan_interpretation method you chose.
# Acceptable values: true, false
folder_interpretation = mpm
scan_interpretation = msm
lettered_chapter_to_number = true
volume_buffer_length = -1
chapter_buffer_length = -1
display_folder_interpretation = true
display_scan_ordering = true
# Advanced Image Processing Settings
# @auto_split_landscape_scans If enabled then MangAI will attempt to automatically split landscape scans that contain two pages into separate portrait images.
# MangAI will try to only split two-page landscape scans where the two pages don't form one giant image.
# Acceptable values: true, false
# @auto_split_r_first If you enabled @auto_split_landscape_scans, then this value determines if the right side of the image should come before the left side.
# Acceptable values: true, false
# Recommended: true for manga and other right-to-left books, or false otherwise
# @auto_split_keep_unsplit_scans If you enabled @auto_split_landscape_scans, then this value determines if MangAI should include the full landscape scan even when it is split.
# This is useful if you want to be able to see the two-page view to get a sense of the full image and still get the benefit of reading individual split pages.
# If enabled, the page ordering of landscape split scans will be: unsplit landscape scan, first split page, second split page
# Acceptable values: true, false
# @allow_auto_split_color_scans If you enabled @auto_split_landscape_scans, then this value will determine whether MangAI will allow or ignore splitting color scans (and so potentially only split grayscale scans)
# This is useful since two-page landscape color scans in manga usually form one big image, but MangAI may detect the page split between the two pages and split them anyway.
# Acceptable values: true, false
# @auto_split_gray_strictness This value affects how strict the two-page detection algorithm is when detecting a page split within a grayscale scan.
# The higher the value, the more obvious the page split must be for MangAI to find it. If set to 1.0 then only grayscale landscape scans with the most obvious page splits will be detected.
# Similarly, a low value means that the page split doesn't have to be well pronounced for MangAI to find it. If set to 0 then all grayscale landscape scans will be split.
# In other words, the more strict you are, the less likely you are to split a scan.
# Acceptable values: A decimal between 0 and 1.0, inclusive.
# Recommend: .8 (for normal strictness), .9 (for high strictness), .7 (for low strictness)
# @auto_split_color_strictness This value affects how strict the two page detection algorithm is when detecting a page split within a color scan.
# The higher the value, the more obvious the page split must be for MangAI to find it. If set to 1.0 then only color landscape scans with the most obvious page splits will be detected.
# Similarly, a low value means that the page split doesn't have to be well pronounced for MangAI to find it. If set to 0 then all color landscape scans will be split.
# Acceptable values: A decimal between 0 and 1.0, inclusive.
# Recommend: .9 (for normal strictness), 1.0 (for high strictness), .8 (for low strictness)
# @auto_split_buffer This value determines the % of the other side of a split page that should be included after the split.
# For example, if the value is set to 0.2 then 20% of the other split page will be included in the current split page.
# Acceptable values: A decimal between 0 and 1.0, inclusive (0 will disable the buffer, 1.0 will include the complete other page)
# @auto_split_page_side_border If you enabled @auto_split_landscape_scans and @add_border, this determines if split scans should have borders added to the left/right side to best represent the original physical page side.
# As a more visual example, enabling this feature will result in [border][left page] for the left page of a split and [right page][border] for the right page of a split.
# Acceptable values: true, false
# Recommended value: true only if you set @auto_split_gray_strictness and @auto_split_color_strictness to 0 (i.e. you are splitting all landscape scans regardless of page split detection), false otherwise
# I also recommed using a small @auto_split_buffer (like a value between 0.05 and 0.1) when using this feature.
# @auto_sense_landscape_folders If you enabled @auto_split_landscape_scans, MangAI will only attempt to split landscape scans within folders that contain mostly landscape scans.
# is is useful because usually you either have a folder with only a few landscape scans (which are not meant to be split) or you have a folder with mostly landscape scans (which should be analyzed for splits).
# Acceptable values: true, false
# Recommended value: true
# @chop_white_rows Chops horizontal white bars within a scan (i.e. finds white rows, removes them, shifts sections of image to cover the empty space).
# Uses @trim_cancel to prevent too much chopping.
# Acceptable values: true, false
# Recommended: true (if using 6" or smaller ereader), false (if using large screen ereader, no need to waste time on this)
# @chop_white_columns Chops vertical white bars within a scan (i.e. finds white columns, removes them, shifts sections of image to cover the empty space).
# This is especially useful if you are processing classic 4 or 6 panel manga as most manga will not contain white columns (other than the borders which are handled by @auto_trim).
# Uses @trim_cancel to prevent too much chopping.
# Acceptable values: true, false
# Recommended: true (if using 6" or smaller ereader), false (if using large screen ereader, no need to waste time on this)
# @chop_fuzz If @chop_white_rows or @chop_white_columns is enabled, this is the fuzz value to use when chopping.
# Acceptable values: An integer between 0 and 100, inclusive
# Recommended: 25 (or 15 if you want to play it safe)
# @adjust_contrast Adjusts the contrast level of the output images.
# The value represents how many times the contrast adjustment alogrithm should be run on an image (for example, a value of 3 would result in the contrast algorithm being run three times).
# A positive value will increase contrast, a negative value will decrease contrast, and a value of 0 leaves the contrast unmodified.
# Acceptable values: 0 (to disable), an integer between 1 and 5 inclusive (to increase contrast), or an integer between -5 and -1 inclusive (to decrease contrast)
# Recommended value: Personally I think contrast adjustments should be done manually on a per image basis (so I leave this disabled). If you are going to use this feature, I recommend using a small value (1 or -1).
# @auto_level Determines whether to use the ImageMagick -auto-level feature.
# Description from the ImageMagick website: "It finds the exact minimum and maximum color values in the image and then applies a -level operator to stretch the values to the full range of values."
# Acceptable values: true, false
auto_split_landscape_scans = true
auto_split_r_first = true
auto_split_keep_unsplit_scans = false
allow_auto_split_color_scans = false
auto_split_gray_strictness = 0.8
auto_split_color_strictness = 0.9
auto_split_buffer = 0.0
auto_split_page_side_border = false
auto_sense_landscape_folders = true
chop_white_rows = true
chop_white_columns = true
chop_fuzz = 25
adjust_contrast = 0
auto_level = false
# Helper Programs
# Note: See README.txt for details on downloading and installing these programs.
# @image_magick_dir Location of ImageMagick exectuables
# For Linux systems, should be /usr/bin/
# For Windows systems, should be something like C:\\Program Files\\ImageMagick-6.5.4-Q16\\
# @unrar_handler Location of unrar executable
# For Linux systems, should be something like /usr/bin/unrar
# For Windows systems, should be something like C:\\Program Files\\WinRAR\\UnRAR.exe
# @rar_handler Location of rar executable
# For Linux systems, should be something like /usr/bin/rar
# For Windows systems, should be something like C:\\Program Files\\WinRAR\\Rar.exe
# @pdftk Location of pdftk executable.
# For Linux systems, should be something like /usr/bin/pdftk
# For Windows systems, should be something like C:\\Windows\\system32\\pdftk.exe
image_magick_dir = /usr/local/Cellar/imagemagick/6.7.7-6/bin
unrar_handler = /usr/local/bin/
rar_handler = /usr/local/bin/
pdftk =
# Other Settings
# @kindle_bookmark Determines whether to create a Kindle bookmark file or not.
# Acceptable values: true, false
# Recommended: true if you are using a Kindle, or false otherwise
# @archive_input_image_folders If enabled then any input image folder will be archived (using @archive_format) and then the folder will be deleted.
# This is useful if you have a large collection of image folders and wish to simplify your file structure (reduces thousands of images to a collection of archives).
# Acceptable values: true, false
# @unarchive_input_image_archives If enabled then any input image archive will be unarchived to a folder and then the archive will be deleted.
# This value supersedes @archive_input_image_folders and is useful if you need to test individual images within an archive collection.
# Acceptable values: true, false
# @open_output_folder If enabled, MangAI will try to open output_folder using your operating system's native file explorer upon completion of processing.
# Note that this feature is not available in all operating systems but should work for most of them.
# Acceptable values: true, false
# @threads Number of threads to use during processing.
# Acceptable values: auto, an integer greater than or equal to 1
# Recommended: auto (allows MangAI to determine the number of threads based on how many cpu cores it detects)
# @license Location of license file.
# A license is required to use this program. You may request a free trial license when you launch the program, or you can purchase a full license from our website: http://www.bitcake.com
# For Linux systems, should be something like /path/to/mangai_full_license.lic or /path/to/mangai_trial_license.lic
# For Windows systems, should be something like C:\\path\\to\\mangai_full_license_file.lic or C:\\path\\to\\mangai_trial_license_file.lic
kindle_bookmark = true
archive_input_image_folders = false
unarchive_input_image_archives = false
open_output_folder = false
threads = auto
license = /Users/patrick/Applications/mangai/mangai_full_license.lic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment