default_tweaks.py 30 KB

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