| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai |
| 3 |
# License: GPLv3 Copyright: 2010, Kovid Goyal <kovid at kovidgoyal.net> |
| 4 |
|
| 5 |
|
| 6 |
# Contains various tweaks that affect calibre behavior. Only edit this file if |
| 7 |
# you know what you are doing. If you delete this file, it will be recreated from |
| 8 |
# defaults. |
| 9 |
|
| 10 |
#: Auto increment series index |
| 11 |
# The algorithm used to assign a book added to an existing series a series number. |
| 12 |
# New series numbers assigned using this tweak are always integer values, except |
| 13 |
# if a constant non-integer is specified. |
| 14 |
# Possible values are: |
| 15 |
# next - First available integer larger than the largest existing number |
| 16 |
# first_free - First available integer larger than 0 |
| 17 |
# next_free - First available integer larger than the smallest existing number |
| 18 |
# last_free - First available integer smaller than the largest existing number. Return largest existing + 1 if no free number is found |
| 19 |
# const - Assign the number 1 always |
| 20 |
# no_change - Do not change the series index |
| 21 |
# a number - Assign that number always. The number is not in quotes. Note that 0.0 can be used here. |
| 22 |
# Examples: |
| 23 |
# series_index_auto_increment = 'next' |
| 24 |
# series_index_auto_increment = 'next_free' |
| 25 |
# series_index_auto_increment = 16.5 |
| 26 |
# |
| 27 |
# Set the use_series_auto_increment_tweak_when_importing tweak to True to |
| 28 |
# use the above values when importing/adding books. If this tweak is set to |
| 29 |
# False (the default) then the series number will be set to 1 if it is not |
| 30 |
# explicitly set during the import. If set to True, then the |
| 31 |
# series index will be set according to the series_index_auto_increment setting. |
| 32 |
# Note that the use_series_auto_increment_tweak_when_importing tweak is used |
| 33 |
# only when a value is not provided during import. If the importing regular |
| 34 |
# expression produces a value for series_index, or if you are reading metadata |
| 35 |
# from books and the import plugin produces a value, then that value will |
| 36 |
# be used irrespective of the setting of the tweak. |
| 37 |
series_index_auto_increment = 'next' |
| 38 |
use_series_auto_increment_tweak_when_importing = False |
| 39 |
|
| 40 |
#: Add separator after completing an author name |
| 41 |
# Set this if the completion separator should be appended to the end of the |
| 42 |
# completed text to automatically begin a new completion operation for authors. |
| 43 |
# It can be either True or False |
| 44 |
authors_completer_append_separator = False |
| 45 |
|
| 46 |
#: Author sort name algorithm |
| 47 |
# The algorithm used to copy author to author_sort. |
| 48 |
# Possible values are: |
| 49 |
# invert: use "fn ln" -> "ln, fn" |
| 50 |
# copy : copy author to author_sort without modification |
| 51 |
# comma : use 'copy' if there is a ',' in the name, otherwise use 'invert' |
| 52 |
# nocomma : "fn ln" -> "ln fn" (without the comma) |
| 53 |
# When this tweak is changed, the author_sort values stored with each author |
| 54 |
# must be recomputed by right-clicking on an author in the left-hand tags |
| 55 |
# panel, selecting 'Manage authors', and pressing |
| 56 |
# 'Recalculate all author sort values'. |
| 57 |
# |
| 58 |
# The author_name_suffixes are words that are ignored when they occur at the |
| 59 |
# end of an author name. The case of the suffix is ignored and trailing |
| 60 |
# periods are automatically handled. |
| 61 |
# |
| 62 |
# The same is true for author_name_prefixes. |
| 63 |
# |
| 64 |
# The author_name_copywords are a set of words which, if they occur in an |
| 65 |
# author name, cause the automatically generated author sort string to be |
| 66 |
# identical to the author's name. This means that the sort for a string like |
| 67 |
# "Acme Inc." will be "Acme Inc." instead of "Inc., Acme". |
| 68 |
# |
| 69 |
# If author_use_surname_prefixes is enabled, any of the words in |
| 70 |
# author_surname_prefixes will be treated as a prefix to the surname, if they |
| 71 |
# occur before the surname. So for example, "John von Neumann" would be sorted |
| 72 |
# as "von Neumann, John" and not "Neumann, John von". |
| 73 |
author_sort_copy_method = 'comma' |
| 74 |
author_name_suffixes = ('Jr', 'Sr', 'Inc', 'Ph.D', 'Phd', 'MD', 'M.D', 'I', 'II', 'III', 'IV', 'Junior', 'Senior') |
| 75 |
author_name_prefixes = ('Mr', 'Mrs', 'Ms', 'Dr', 'Prof') |
| 76 |
author_name_copywords = ( |
| 77 |
'Agency', |
| 78 |
'Corporation', |
| 79 |
'Company', |
| 80 |
'Co.', |
| 81 |
'Council', |
| 82 |
'Committee', |
| 83 |
'Inc.', |
| 84 |
'Institute', |
| 85 |
'National', |
| 86 |
'Society', |
| 87 |
'Club', |
| 88 |
'Team', |
| 89 |
'Software', |
| 90 |
'Games', |
| 91 |
'Entertainment', |
| 92 |
'Media', |
| 93 |
'Studios', |
| 94 |
) |
| 95 |
author_use_surname_prefixes = False |
| 96 |
author_surname_prefixes = ('da', 'de', 'di', 'la', 'le', 'van', 'von') |
| 97 |
|
| 98 |
#: Splitting multiple author names |
| 99 |
# By default, calibre splits a string containing multiple author names on |
| 100 |
# ampersands and the words "and" and "with". You can customize the splitting |
| 101 |
# by changing the regular expression below. Strings are split on whatever the |
| 102 |
# specified regular expression matches, in addition to ampersands. |
| 103 |
# Default: r'(?i),?\s+(and|with)\s+' |
| 104 |
authors_split_regex = r'(?i),?\s+(and|with)\s+' |
| 105 |
|
| 106 |
#: Use author_sort and/or series_sort for names in Tag browser |
| 107 |
# Set which author or series field is used to display as the item name in the |
| 108 |
# Tag browser (the list of authors, series, publishers etc on the left hand |
| 109 |
# side). The choices for author are 'author' and 'author_sort'. The choices for |
| 110 |
# series are 'series' and 'series_sort'. This tweak affects only what is |
| 111 |
# displayed under the category in the Tag browser and Content server. Please |
| 112 |
# note that if you set this to …_sort, it is possible to see duplicate names in |
| 113 |
# the list because although it is guaranteed that author and series names are |
| 114 |
# unique, there is no such guarantee for their sort values. Showing duplicates |
| 115 |
# won't break anything but it could lead to some confusion. The tooltip for an |
| 116 |
# item will show the item's name no matter how you set this tweak. |
| 117 |
# Examples: |
| 118 |
# categories_use_field_for_author_name = 'author' |
| 119 |
# categories_use_field_for_author_name = 'author_sort' |
| 120 |
# categories_use_field_for_series_name = 'series' |
| 121 |
# categories_use_field_for_series_name = 'series_sort' |
| 122 |
categories_use_field_for_author_name = 'author' |
| 123 |
categories_use_field_for_series_name = 'series' |
| 124 |
|
| 125 |
#: Control partitioning of Tag browser |
| 126 |
# When partitioning the Tag browser, the format of the subcategory label is |
| 127 |
# controlled by a template: categories_collapsed_name_template if sorting by |
| 128 |
# name, categories_collapsed_rating_template if sorting by average rating, and |
| 129 |
# categories_collapsed_popularity_template if sorting by popularity. There are |
| 130 |
# two variables available to the template: first and last. The variable 'first' |
| 131 |
# is the initial item in the subcategory, and the variable 'last' is the final |
| 132 |
# item in the subcategory. Both variables are 'objects'; they each have multiple |
| 133 |
# values that are obtained by using a suffix. For example, first.name for an |
| 134 |
# author category will be the name of the author. The sub-values available are: |
| 135 |
# name: the printable name of the item |
| 136 |
# count: the number of books that references this item |
| 137 |
# avg_rating: the average rating of all the books referencing this item |
| 138 |
# sort: the sort value. For authors, this is the author_sort for that author |
| 139 |
# category: the category (e.g., authors, series) that the item is in. |
| 140 |
# Note that the "r'" in front of the { is necessary if there are backslashes |
| 141 |
# (\ characters) in the template. It doesn't hurt anything to leave it there |
| 142 |
# even if there aren't any backslashes. |
| 143 |
categories_collapsed_name_template = r'{first.sort:shorten(4,,0)} - {last.sort:shorten(4,,0)}' |
| 144 |
categories_collapsed_rating_template = r'{first.avg_rating:4.2f:ifempty(0)} - {last.avg_rating:4.2f:ifempty(0)}' |
| 145 |
categories_collapsed_popularity_template = r'{first.count:d} - {last.count:d}' |
| 146 |
|
| 147 |
#: Specify columns to sort the booklist by on startup |
| 148 |
# Provide a set of columns to be sorted on when calibre starts. |
| 149 |
# The argument is None if saved sort history is to be used |
| 150 |
# otherwise it is a list of column,order pairs. Column is the |
| 151 |
# lookup/search name, found using the tooltip for the column |
| 152 |
# Order is 0 for ascending, 1 for descending. |
| 153 |
# For example, set it to [('authors',0),('title',0)] to sort by |
| 154 |
# title within authors. |
| 155 |
sort_columns_at_startup = None |
| 156 |
|
| 157 |
#: Control how dates are displayed |
| 158 |
# Format to be used for publication date and the timestamp (date). |
| 159 |
# A string controlling how the publication date is displayed in the GUI |
| 160 |
# d the day as number without a leading zero (1 to 31) |
| 161 |
# dd the day as number with a leading zero (01 to 31) |
| 162 |
# ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun') |
| 163 |
# dddd the long localized day name (e.g. 'Monday' to 'Sunday') |
| 164 |
# M the month as number without a leading zero (1-12) |
| 165 |
# MM the month as number with a leading zero (01-12) |
| 166 |
# MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec') |
| 167 |
# MMMM the long localized month name (e.g. 'January' to 'December') |
| 168 |
# yy the year as two digit number (00-99) |
| 169 |
# yyyy the year as four digit number |
| 170 |
# h the hours without a leading 0 (0 to 11 or 0 to 23, depending on am/pm) |
| 171 |
# hh the hours with a leading 0 (00 to 11 or 00 to 23, depending on am/pm) |
| 172 |
# m the minutes without a leading 0 (0 to 59) |
| 173 |
# mm the minutes with a leading 0 (00 to 59) |
| 174 |
# s the seconds without a leading 0 (0 to 59) |
| 175 |
# ss the seconds with a leading 0 (00 to 59) |
| 176 |
# ap use a 12-hour clock instead of a 24-hour clock, with "ap" replaced by the lowercase localized string for am or pm |
| 177 |
# AP use a 12-hour clock instead of a 24-hour clock, with "AP" replaced by the uppercase localized string for AM or PM |
| 178 |
# aP use a 12-hour clock instead of a 24-hour clock, with "aP" replaced by the localized string for am or pm |
| 179 |
# Ap use a 12-hour clock instead of a 24-hour clock, with "Ap" replaced by the localized string for AM or PM |
| 180 |
# iso the date with time and timezone. Must be the only format present |
| 181 |
# For example, given the date of 9 Jan 2010, the following formats show |
| 182 |
# MMM yyyy ==> Jan 2010 yyyy ==> 2010 dd MMM yyyy ==> 09 Jan 2010 |
| 183 |
# MM/yyyy ==> 01/2010 d/M/yy ==> 9/1/10 yy ==> 10 |
| 184 |
# |
| 185 |
# publication default if not set: MMM yyyy |
| 186 |
# timestamp default if not set: dd MMM yyyy |
| 187 |
# last_modified_display_format if not set: dd MMM yyyy |
| 188 |
gui_pubdate_display_format = 'MMM yyyy' |
| 189 |
gui_timestamp_display_format = 'dd MMM yyyy' |
| 190 |
gui_last_modified_display_format = 'dd MMM yyyy' |
| 191 |
|
| 192 |
#: Control sorting of titles and series in the library display |
| 193 |
# Control title and series sorting in the library view. If set to |
| 194 |
# 'library_order', the title sort field will be used instead of the title. |
| 195 |
# Unless you have manually edited the title sort field, leading articles such as |
| 196 |
# The and A will be ignored. If set to 'strictly_alphabetic', the titles will be |
| 197 |
# sorted as-is (sort by title instead of title sort). For example, with |
| 198 |
# library_order, The Client will sort under 'C'. With strictly_alphabetic, the |
| 199 |
# book will sort under 'T'. |
| 200 |
# This flag affects calibre's library display. It has no effect on devices. In |
| 201 |
# addition, titles for books added before changing the flag will retain their |
| 202 |
# order until the title is edited. Editing a title and hitting Enter |
| 203 |
# without changing anything is sufficient to change the sort. Or you can use |
| 204 |
# the 'Update title sort' action in the Bulk metadata edit dialog to update |
| 205 |
# it for many books at once. |
| 206 |
title_series_sorting = 'library_order' |
| 207 |
|
| 208 |
#: Control formatting of title and series when used in templates |
| 209 |
# Control how title and series names are formatted when saving to disk/sending |
| 210 |
# to device. The behavior depends on the field being processed. If processing |
| 211 |
# title, then if this tweak is set to 'library_order', the title will be |
| 212 |
# replaced with title_sort. If it is set to 'strictly_alphabetic', then the |
| 213 |
# title will not be changed. If processing series, then if set to |
| 214 |
# 'library_order', articles such as 'The' and 'An' will be moved to the end. If |
| 215 |
# set to 'strictly_alphabetic', the series will be sent without change. |
| 216 |
# For example, if the tweak is set to library_order, "The Lord of the Rings" |
| 217 |
# will become "Lord of the Rings, The". If the tweak is set to |
| 218 |
# strictly_alphabetic, it would remain "The Lord of the Rings". Note that the |
| 219 |
# formatter function raw_field will return the base value for title and |
| 220 |
# series regardless of the setting of this tweak. |
| 221 |
save_template_title_series_sorting = 'library_order' |
| 222 |
|
| 223 |
#: Set the list of words considered to be "articles" for sort strings |
| 224 |
# Set the list of words that are to be considered 'articles' when computing the |
| 225 |
# title sort strings. The articles differ by language. By default, calibre uses |
| 226 |
# a combination of articles from English and whatever language the calibre user |
| 227 |
# interface is set to. In addition, in some contexts where the book language is |
| 228 |
# available, the language of the book is used. You can change the list of |
| 229 |
# articles for a given language or add a new language by editing |
| 230 |
# per_language_title_sort_articles. To tell calibre to use a language other |
| 231 |
# than the user interface language, set, default_language_for_title_sort. For |
| 232 |
# example, to use German, set it to 'deu'. A value of None means the user |
| 233 |
# interface language is used. The setting title_sort_articles is ignored |
| 234 |
# (present only for legacy reasons). |
| 235 |
per_language_title_sort_articles = { |
| 236 |
# English |
| 237 |
'eng': (r'A\s+', r'The\s+', r'An\s+'), |
| 238 |
# Esperanto |
| 239 |
'epo': (r'La\s+', r"L'", 'L´'), |
| 240 |
# Spanish |
| 241 |
'spa': (r'El\s+', r'La\s+', r'Lo\s+', r'Los\s+', r'Las\s+', r'Un\s+', r'Una\s+', r'Unos\s+', r'Unas\s+'), |
| 242 |
# French |
| 243 |
'fra': (r'Le\s+', r'La\s+', r"L'", r'L´', r'L’', r'Les\s+', r'Un\s+', r'Une\s+', r'Des\s+', r'De\s+(La\s+)?', r"D'", r'D´', r'D’'), |
| 244 |
# Polish |
| 245 |
'pol': (), |
| 246 |
# Italian |
| 247 |
'ita': ( |
| 248 |
r'Lo\s+', |
| 249 |
r'Il\s+', |
| 250 |
r"L'", |
| 251 |
r'L´', |
| 252 |
r'La\s+', |
| 253 |
r'Gli\s+', |
| 254 |
r'I\s+', |
| 255 |
r'Le\s+', |
| 256 |
r'Uno\s+', |
| 257 |
r'Un\s+', |
| 258 |
r'Una\s+', |
| 259 |
r"Un'", |
| 260 |
r'Un´', |
| 261 |
r'Dei\s+', |
| 262 |
r'Degli\s+', |
| 263 |
r'Delle\s+', |
| 264 |
r'Del\s+', |
| 265 |
r'Della\s+', |
| 266 |
r'Dello\s+', |
| 267 |
r"Dell'", |
| 268 |
r'Dell´', |
| 269 |
), |
| 270 |
# Portuguese |
| 271 |
'por': (r'A\s+', r'O\s+', r'Os\s+', r'As\s+', r'Um\s+', r'Uns\s+', r'Uma\s+', r'Umas\s+'), |
| 272 |
# Romanian |
| 273 |
'ron': (r'Un\s+', r'O\s+', r'Nişte\s+'), |
| 274 |
# German |
| 275 |
'deu': (r'Der\s+', r'Die\s+', r'Das\s+', r'Den\s+', r'Ein\s+', r'Eine\s+', r'Einen\s+', r'Dem\s+', r'Des\s+', r'Einem\s+', r'Eines\s+'), |
| 276 |
# Dutch |
| 277 |
'nld': (r'De\s+', r'Het\s+', r'Een\s+', r"'n\s+", r"'s\s+", r'Ene\s+', r'Ener\s+', r'Enes\s+', r'Den\s+', r'Der\s+', r'Des\s+', r"'t\s+"), |
| 278 |
# Swedish |
| 279 |
'swe': (r'En\s+', r'Ett\s+', r'Det\s+', r'Den\s+', r'De\s+'), |
| 280 |
# Turkish |
| 281 |
'tur': (r'Bir\s+',), |
| 282 |
# Afrikaans |
| 283 |
'afr': (r"'n\s+", r'Die\s+'), |
| 284 |
# Greek |
| 285 |
'ell': (r'O\s+', r'I\s+', r'To\s+', r'Ta\s+', r'Tus\s+', r'Tis\s+', r"'Enas\s+", r"'Mia\s+", r"'Ena\s+", r"'Enan\s+"), |
| 286 |
# Hungarian |
| 287 |
'hun': (r'A\s+', r'Az\s+', r'Egy\s+'), |
| 288 |
} |
| 289 |
default_language_for_title_sort = None |
| 290 |
title_sort_articles = r'^(A|The|An)\s+' |
| 291 |
|
| 292 |
#: Specify a folder calibre should connect to at startup |
| 293 |
# Specify a folder that calibre should connect to at startup using |
| 294 |
# connect_to_folder. This must be a full path to the folder. If the folder does |
| 295 |
# not exist when calibre starts, it is ignored. |
| 296 |
# Example for Windows: |
| 297 |
# auto_connect_to_folder = 'C:/Users/someone/Desktop/testlib' |
| 298 |
# Example for other operating systems: |
| 299 |
# auto_connect_to_folder = '/home/dropbox/My Dropbox/someone/library' |
| 300 |
auto_connect_to_folder = '' |
| 301 |
|
| 302 |
#: Specify renaming rules for SONY collections |
| 303 |
# Specify renaming rules for SONY collections. This tweak is only applicable if |
| 304 |
# metadata management is set to automatic. Collections on SONYs are named |
| 305 |
# depending upon whether the field is standard or custom. A collection derived |
| 306 |
# from a standard field is named for the value in that field. |
| 307 |
# |
| 308 |
# For example, if the standard 'series' column contains the value 'Darkover', then the |
| 309 |
# collection name is 'Darkover'. A collection derived from a custom field will |
| 310 |
# have the name of the field added to the value. For example, if a custom series |
| 311 |
# column named 'My Series' contains the name 'Darkover', then the collection |
| 312 |
# will by default be named 'Darkover (My Series)'. For purposes of this |
| 313 |
# documentation, 'Darkover' is called the value and 'My Series' is called the |
| 314 |
# category. If two books have fields that generate the same collection name, |
| 315 |
# then both books will be in that collection. |
| 316 |
# |
| 317 |
# This set of tweaks lets you specify for a standard or custom field how |
| 318 |
# the collections are to be named. You can use it to add a description to a |
| 319 |
# standard field, for example 'Foo (Tag)' instead of the 'Foo'. You can also use |
| 320 |
# it to force multiple fields to end up in the same collection. |
| 321 |
# |
| 322 |
# For example, you could force the values in 'series', '#my_series_1', and |
| 323 |
# '#my_series_2' to appear in collections named 'some_value (Series)', thereby |
| 324 |
# merging all of the fields into one set of collections. |
| 325 |
# |
| 326 |
# There are two related tweaks. The first determines the category name to use |
| 327 |
# for a metadata field. The second is a template, used to determines how the |
| 328 |
# value and category are combined to create the collection name. |
| 329 |
# The syntax of the first tweak, sony_collection_renaming_rules, is: |
| 330 |
# {'field_lookup_name':'category_name_to_use', 'lookup_name':'name', ...} |
| 331 |
# |
| 332 |
# The second tweak, sony_collection_name_template, is a template. It uses the |
| 333 |
# same template language as plugboards and save templates. This tweak controls |
| 334 |
# how the value and category are combined together to make the collection name. |
| 335 |
# The only two fields available are {category} and {value}. The {value} field is |
| 336 |
# never empty. The {category} field can be empty. The default is to put the |
| 337 |
# value first, then the category enclosed in parentheses, it isn't empty: |
| 338 |
# '{value} {category:|(|)}' |
| 339 |
# |
| 340 |
# Examples: The first three examples assume that the second tweak |
| 341 |
# has not been changed. |
| 342 |
# |
| 343 |
# 1) I want three series columns to be merged into one set of collections. The |
| 344 |
# column lookup names are 'series', '#series_1' and '#series_2'. I want nothing |
| 345 |
# in the parenthesis. The value to use in the tweak value would be: |
| 346 |
# sony_collection_renaming_rules={'series':'', '#series_1':'', '#series_2':''} |
| 347 |
# |
| 348 |
# 2) I want the word '(Series)' to appear on collections made from series, and |
| 349 |
# the word '(Tag)' to appear on collections made from tags. Use: |
| 350 |
# sony_collection_renaming_rules={'series':'Series', 'tags':'Tag'} |
| 351 |
# |
| 352 |
# 3) I want 'series' and '#myseries' to be merged, and for the collection name |
| 353 |
# to have '(Series)' appended. The renaming rule is: |
| 354 |
# sony_collection_renaming_rules={'series':'Series', '#myseries':'Series'} |
| 355 |
# |
| 356 |
# 4) Same as example 2, but instead of having the category name in parentheses |
| 357 |
# and appended to the value, I want it prepended and separated by a colon, such |
| 358 |
# as in Series: Darkover. I must change the template used to format the category name |
| 359 |
# |
| 360 |
# The resulting two tweaks are: |
| 361 |
# sony_collection_renaming_rules={'series':'Series', 'tags':'Tag'} |
| 362 |
# sony_collection_name_template='{category:||: }{value}' |
| 363 |
sony_collection_renaming_rules = {} |
| 364 |
sony_collection_name_template = '{value}{category:| (|)}' |
| 365 |
|
| 366 |
#: Specify how SONY collections are sorted |
| 367 |
# Specify how SONY collections are sorted. This tweak is only applicable if |
| 368 |
# metadata management is set to automatic. You can indicate which metadata is to |
| 369 |
# be used to sort on a collection-by-collection basis. The format of the tweak |
| 370 |
# is a list of metadata fields from which collections are made, followed by the |
| 371 |
# name of the metadata field containing the sort value. |
| 372 |
# Example: The following indicates that collections built from pubdate and tags |
| 373 |
# are to be sorted by the value in the custom column '#mydate', that collections |
| 374 |
# built from 'series' are to be sorted by 'series_index', and that all other |
| 375 |
# collections are to be sorted by title. If a collection metadata field is not |
| 376 |
# named, then if it is a series- based collection it is sorted by series order, |
| 377 |
# otherwise it is sorted by title order. |
| 378 |
# [(['pubdate', 'tags'],'#mydate'), (['series'],'series_index'), (['*'], 'title')] |
| 379 |
# Note that the bracketing and parentheses are required. The syntax is |
| 380 |
# [ ( [list of fields], sort field ) , ( [ list of fields ] , sort field ) ] |
| 381 |
# Default: empty (no rules), so no collection attributes are named. |
| 382 |
sony_collection_sorting_rules = [] |
| 383 |
|
| 384 |
#: Set the maximum number of sort 'levels' |
| 385 |
# Set the maximum number of sort 'levels' that calibre will use to resort the |
| 386 |
# library after certain operations such as searches or device insertion. Each |
| 387 |
# sort level adds a performance penalty. If the database is large (thousands of |
| 388 |
# books) the penalty might be noticeable. If you are not concerned about multi- |
| 389 |
# level sorts, and if you are seeing a slowdown, reduce the value of this tweak. |
| 390 |
maximum_resort_levels = 5 |
| 391 |
|
| 392 |
#: Choose whether dates are sorted using visible fields |
| 393 |
# Date values contain both a date and a time. When sorted, all the fields are |
| 394 |
# used, regardless of what is displayed. Set this tweak to True to use only |
| 395 |
# the fields that are being displayed. |
| 396 |
sort_dates_using_visible_fields = False |
| 397 |
|
| 398 |
#: Fuzz value for trimming covers |
| 399 |
# The value used for the fuzz distance when trimming a cover. |
| 400 |
# Colors within this distance are considered equal. |
| 401 |
# The distance is in absolute intensity units. |
| 402 |
cover_trim_fuzz_value = 10 |
| 403 |
|
| 404 |
#: Control behavior of the book list |
| 405 |
# You can control the behavior of double clicks and pressing Enter on the books |
| 406 |
# list. Choices: open_viewer, do_nothing, show_book_details, |
| 407 |
# show_locked_book_details, edit_cell, edit_metadata. Selecting anything other |
| 408 |
# than open_viewer, show_book_details, or show_locked_book_details has the side |
| 409 |
# effect of disabling editing a field using a single click. |
| 410 |
# Default: open_viewer. |
| 411 |
# Example: doubleclick_on_library_view = 'do_nothing' |
| 412 |
# You can also control whether the book list scrolls per item or |
| 413 |
# per pixel. Default is per item. |
| 414 |
doubleclick_on_library_view = 'open_viewer' |
| 415 |
enter_key_behavior = 'do_nothing' |
| 416 |
horizontal_scrolling_per_column = False |
| 417 |
vertical_scrolling_per_row = False |
| 418 |
|
| 419 |
#: Language to use when sorting |
| 420 |
# Setting this tweak will force sorting to use the |
| 421 |
# collating order for the specified language. This might be useful if you run |
| 422 |
# calibre in English but want sorting to work in the language where you live. |
| 423 |
# Set the tweak to the desired ISO 639-1 language code, in lower case. |
| 424 |
# You can find the list of supported locales at |
| 425 |
# https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes |
| 426 |
# Default: locale_for_sorting = '' -- use the language calibre displays in |
| 427 |
# Example: locale_for_sorting = 'fr' -- sort using French rules. |
| 428 |
# Example: locale_for_sorting = 'nb' -- sort using Norwegian rules. |
| 429 |
locale_for_sorting = '' |
| 430 |
|
| 431 |
#: The number of seconds to wait before sending emails |
| 432 |
# The number of seconds to wait before sending emails when using a |
| 433 |
# public email server like GMX/Hotmail/Gmail. Default is: 5 minutes |
| 434 |
# Setting it to lower may cause the server's SPAM controls to kick in, |
| 435 |
# making email sending fail. Changes will take effect only after a restart of |
| 436 |
# calibre. You can also change the list of hosts that calibre considers |
| 437 |
# to be public relays here. Any relay host ending with one of the suffixes |
| 438 |
# in the list below will be considered a public email server. |
| 439 |
public_smtp_relay_delay = 301 |
| 440 |
public_smtp_relay_host_suffixes = ['gmail.com', 'live.com', 'gmx.com', 'outlook.com'] |
| 441 |
|
| 442 |
#: The maximum width and height for covers saved in the calibre library |
| 443 |
# All covers in the calibre library will be resized, preserving aspect ratio, |
| 444 |
# to fit within this size. This is to prevent slowdowns caused by extremely |
| 445 |
# large covers |
| 446 |
maximum_cover_size = (1650, 2200) |
| 447 |
|
| 448 |
#: Where to send downloaded news |
| 449 |
# When automatically sending downloaded news to a connected device, calibre |
| 450 |
# will by default send it to the main memory. By changing this tweak, you can |
| 451 |
# control where it is sent. Valid values are "main", "carda", "cardb". Note |
| 452 |
# that if there isn't enough free space available on the location you choose, |
| 453 |
# the files will be sent to the location with the most free space. |
| 454 |
send_news_to_device_location = 'main' |
| 455 |
|
| 456 |
#: Unified toolbar on macOS |
| 457 |
# If you enable this option and restart calibre, the toolbar will be 'unified' |
| 458 |
# with the titlebar as is normal for macOS applications. However, doing this has |
| 459 |
# various bugs, for instance the minimum width of the toolbar becomes twice |
| 460 |
# what it should be and it causes other random bugs on some systems, so turn it |
| 461 |
# on at your own risk! |
| 462 |
unified_title_toolbar_on_osx = False |
| 463 |
|
| 464 |
#: Save original file when converting/polishing from same format to same format |
| 465 |
# When calibre does a conversion from the same format to the same format, for |
| 466 |
# example, from EPUB to EPUB, the original file is saved, so that in case the |
| 467 |
# conversion is poor, you can tweak the settings and run it again. By setting |
| 468 |
# this to False you can prevent calibre from saving the original file. |
| 469 |
# Similarly, by setting save_original_format_when_polishing to False you can |
| 470 |
# prevent calibre from saving the original file when polishing. |
| 471 |
save_original_format = True |
| 472 |
save_original_format_when_polishing = True |
| 473 |
|
| 474 |
#: Number of recently viewed books to show |
| 475 |
# Right-clicking the "View" button shows a list of recently viewed books. Control |
| 476 |
# how many should be shown, here. |
| 477 |
gui_view_history_size = 15 |
| 478 |
|
| 479 |
#: Change the font size of the Book details panel in the interface |
| 480 |
# Change the font size at which book details are rendered in the side panel and |
| 481 |
# comments are rendered in the metadata edit dialog. Set it to a positive or |
| 482 |
# negative number to increase or decrease the font size. Similarly, change the |
| 483 |
# font size of the widget used to converse with AI. |
| 484 |
change_book_details_font_size_by = 0 |
| 485 |
change_ai_chat_font_size_by = 0 |
| 486 |
|
| 487 |
#: What format to default to when using the "Unpack book" feature |
| 488 |
# The "Unpack book" feature of calibre allows direct editing of a book format. |
| 489 |
# If multiple formats are available, calibre will offer you a choice |
| 490 |
# of formats, defaulting to your preferred output format if it is available. |
| 491 |
# Set this tweak to a specific value of 'EPUB' or 'AZW3' to always default |
| 492 |
# to that format rather than your output format preference. |
| 493 |
# Set to a value of 'remember' to use whichever format you chose last time you |
| 494 |
# used the "Unpack book" feature. |
| 495 |
# Examples: |
| 496 |
# default_tweak_format = None (Use output format) |
| 497 |
# default_tweak_format = 'EPUB' |
| 498 |
# default_tweak_format = 'remember' |
| 499 |
default_tweak_format = None |
| 500 |
|
| 501 |
#: Do not preselect a completion when editing authors/tags/series/etc. |
| 502 |
# This means that you can make changes and press Enter and your changes will |
| 503 |
# not be overwritten by a matching completion. However, if you wish to use the |
| 504 |
# completions you will now have to press Tab to select one before pressing |
| 505 |
# Enter. Which technique you prefer will depend on the state of metadata in |
| 506 |
# your library and your personal editing style. |
| 507 |
# |
| 508 |
# If preselect_first_completion is False and you want Tab to accept what you |
| 509 |
# typed instead of the first completion then set tab_accepts_uncompleted_text |
| 510 |
# to True. If you do this then to select from the completions you must press |
| 511 |
# the Down or Up arrow keys. The tweak tab_accepts_uncompleted_text is ignored |
| 512 |
# if preselect_first_completion is True |
| 513 |
preselect_first_completion = False |
| 514 |
tab_accepts_uncompleted_text = False |
| 515 |
|
| 516 |
#: Completion mode when editing authors/tags/series/etc. |
| 517 |
# By default, when completing items, calibre will show you all the candidates |
| 518 |
# that start with the text you have already typed. You can instead have it show |
| 519 |
# all candidates that contain the text you have already typed. To do this, set |
| 520 |
# completion_mode to 'contains'. For example, if you type asi it will match both |
| 521 |
# Asimov and Quasimodo, whereas the default behavior would match only Asimov. |
| 522 |
# There is also a 'word-prefix' mode that matches only at the start of words, |
| 523 |
# so typing 'asi' will match Asimov and "Isaac Asimov" but not Quasimodo. |
| 524 |
# Similarly, typing 'cat' will match cathedral and "tabby cat" but not education. |
| 525 |
# |
| 526 |
# If completion_mode is 'word-prefix', you can specify additional word break chars |
| 527 |
# with the extra_word_break_chars setting. |
| 528 |
# For example, for extra_word_break_chars = '-' typing 'fic' will match |
| 529 |
# both "Science Fiction" and "Science-Fiction", instead of only the first one. |
| 530 |
completion_mode = 'prefix' |
| 531 |
extra_word_break_chars = '' |
| 532 |
|
| 533 |
#: Sort the list of libraries alphabetically |
| 534 |
# The list of libraries in the Copy to library and Quick switch menus are |
| 535 |
# normally sorted by most used. However, if there are more than a certain |
| 536 |
# number of such libraries, the sorting becomes alphabetic. You can set that |
| 537 |
# number here. The default is ten libraries. |
| 538 |
many_libraries = 10 |
| 539 |
|
| 540 |
#: Choose available output formats for conversion |
| 541 |
# Restrict the list of available output formats in the conversion dialogs. |
| 542 |
# For example, if you only want to convert to EPUB and AZW3, change this to |
| 543 |
# restrict_output_formats = ['EPUB', 'AZW3']. The default value of None causes |
| 544 |
# all available output formats to be present. |
| 545 |
restrict_output_formats = None |
| 546 |
|
| 547 |
#: Set the thumbnail image quality used by the Content server |
| 548 |
# The quality of a thumbnail is largely controlled by the compression quality |
| 549 |
# used when creating it. Set this to a larger number to improve the quality. |
| 550 |
# Note that the thumbnails get much larger with larger compression quality |
| 551 |
# numbers. |
| 552 |
# The value can be between 50 and 99 |
| 553 |
content_server_thumbnail_compression_quality = 75 |
| 554 |
|
| 555 |
#: Image file types to treat as e-books when dropping onto the "Book details" panel |
| 556 |
# Normally, if you drop any image file in a format known to calibre onto the |
| 557 |
# "Book details" panel, it will be used to set the cover. If you want to store |
| 558 |
# some image types as e-books instead, you can set this tweak. |
| 559 |
# Examples: |
| 560 |
# cover_drop_exclude = {'tiff', 'webp'} |
| 561 |
cover_drop_exclude = () |
| 562 |
|
| 563 |
#: Exclude fields when copy/pasting metadata |
| 564 |
# You can ask calibre to not paste some metadata fields when using the |
| 565 |
# Edit metadata->Copy metadata/Paste metadata actions. For example, |
| 566 |
# exclude_fields_on_paste = ['cover', 'timestamp', '#mycolumn'] |
| 567 |
# to prevent pasting of the cover, Date and custom column, mycolumn. |
| 568 |
# You can also add a shortcut in Preferences->Shortcuts->Edit metadata |
| 569 |
# to paste metadata ignoring this tweak. |
| 570 |
exclude_fields_on_paste = [] |
| 571 |
|
| 572 |
#: Skip internet connected check |
| 573 |
# Skip checking whether the internet is available before downloading news. |
| 574 |
# Useful if for some reason your operating systems network checking |
| 575 |
# facilities are not reliable (for example NetworkManager on Linux). |
| 576 |
skip_network_check = False |
| 577 |
|
| 578 |
#: Tab stop width in the template editor |
| 579 |
# Sets the width of the tab stop in the template editor in "average characters". |
| 580 |
# For example, a value of 1 results in a space with the width of one average character. |
| 581 |
template_editor_tab_stop_width = 4 |
| 582 |
|
| 583 |
#: Value for undefined numbers when sorting |
| 584 |
# Sets the value to use for undefined numbers when sorting. |
| 585 |
# For example, the value -10 sorts undefined numbers as if they were set to -10. |
| 586 |
# Use 'maximum' for the largest possible number. Use 'minimum' for the smallest |
| 587 |
# possible number. Quotes are optional if entering a number. |
| 588 |
# Examples: |
| 589 |
# value_for_undefined_numbers_when_sorting = -100 |
| 590 |
# value_for_undefined_numbers_when_sorting = '2' |
| 591 |
# value_for_undefined_numbers_when_sorting = -0.01 |
| 592 |
# value_for_undefined_numbers_when_sorting = 'minimum' |
| 593 |
# value_for_undefined_numbers_when_sorting = 'maximum' |
| 594 |
value_for_undefined_numbers_when_sorting = 0 |
| 595 |
|
| 596 |
#: Allow template database functions in composite columns |
| 597 |
# If True then the template database functions book_values() and book_count() |
| 598 |
# can be used in composite custom columns. Note: setting this tweak to True and |
| 599 |
# using these functions in composites can be very slow. |
| 600 |
# Default: False |
| 601 |
allow_template_database_functions_in_composites = False |
| 602 |
|
| 603 |
|
| 604 |
#: Change the programs that are run when opening files/URLs |
| 605 |
# By default, calibre passes URLs to the operating system to open using |
| 606 |
# whatever default programs are configured there. Here you can override |
| 607 |
# that by specifying the program to use, per URL type. For local files, |
| 608 |
# the type is "file" and for web links it is "http*". For example: |
| 609 |
# openers_by_scheme = { "http*": "firefox %u" } will make calibre run Firefox |
| 610 |
# for https://whatever URLs. %u is replaced by the URL to be opened. The scheme |
| 611 |
# takes a glob pattern allowing a single entry to match multiple URL types. |
| 612 |
openers_by_scheme = {} |
| 613 |
|
| 614 |
#: Set the first day of the week for calendar popups |
| 615 |
# It must be one of the values Default, Sunday, Monday, Tuesday, Wednesday, |
| 616 |
# Thursday, Friday, or Saturday, all in English, spelled exactly as shown. |
| 617 |
calendar_start_day_of_week = 'Default' |
| 618 |
|
| 619 |
#: East Asian language to use for transliteration |
| 620 |
# Setting this tweak will make calibre use the specified language as the "base" |
| 621 |
# language when transliterating East Asian languages to English. This might be |
| 622 |
# useful if you run calibre in English but want text transliterated to |
| 623 |
# Japanese instead of Chinese. The valid values are: |
| 624 |
# 'ja' for Japanese |
| 625 |
# 'kr' for Korean |
| 626 |
# 'vn' for Vietnamese |
| 627 |
# 'zh' for Chinese |
| 628 |
# Any other value will use the language set in calibre preferences as the base |
| 629 |
# language. A base language other than those in the above list causes transliteration |
| 630 |
# with a base language of Chinese. |
| 631 |
# Example: east_asian_base_language = 'ja' |
| 632 |
east_asian_base_language = '' |
| 633 |
|
| 634 |
#: Hide AI features |
| 635 |
# Hide AI features throughout the calibre user interface. Note that AI is |
| 636 |
# already opt-in and no AI related code is even loaded until the user configures some |
| 637 |
# AI backend. This tweak exists simply to hide a few menu entries and the like |
| 638 |
# that mention AI. |
| 639 |
hide_ai_features = False |
| 640 |
|
| 641 |
#: Control GPU usage in Qt WebEngine |
| 642 |
# Qt WebEngine is the library that is used to render content in the calibre |
| 643 |
# viewer and editor. It can optionally use the GPU for enhanced performance, |
| 644 |
# however, this can cause crashes/black screens on some older systems, so it |
| 645 |
# is disabled by default. In normal usage, the performance difference is not |
| 646 |
# noticeable anyway. |
| 647 |
qt_webengine_uses_gpu = False |