### Start Calibre Content Server - Shell Script Source: https://manual.calibre-ebook.com/generated/en/calibre-server The `calibre-server` command starts the Calibre Content server, which makes your Calibre libraries accessible over the internet. You can optionally specify the path to your library folders as arguments. If no paths are provided, all known libraries are used. Arguments with spaces must be enclosed in quotation marks. ```shell calibre-server [options] [path to library folder...] ``` -------------------------------- ### Getting Help for Specific Formats Source: https://manual.calibre-ebook.com/generated/en/ebook-convert To understand the conversion options specific to a particular input and output format, use the `-h` or `--help` option after specifying both the input and output files. This will display detailed help messages for the chosen format combination. ```shell ebook-convert myfile.input_format myfile.output_format -h ``` -------------------------------- ### Add Plugin - calibre-customize Source: https://manual.calibre-ebook.com/generated/en/calibre-customize Adds a Calibre plugin by providing the path to its ZIP file. This is the primary method for installing new plugins. ```bash calibre-customize --add-plugin /path/to/your/plugin.zip calibre-customize -a /path/to/your/plugin.zip ``` -------------------------------- ### List Plugins - calibre-customize Source: https://manual.calibre-ebook.com/generated/en/calibre-customize Lists all currently installed plugins within Calibre. This command helps in identifying available plugins and their names. ```bash calibre-customize --list-plugins calibre-customize -l ``` -------------------------------- ### Upgrade Book Format with ebook-polish Source: https://manual.calibre-ebook.com/generated/en/ebook-polish Upgrades the internal structure of the e-book, for example, converting EPUB 2 books to EPUB 3. This functionality is provided by the `ebook-polish` command-line tool to modernize book formats. ```shell --upgrade-book, -U ``` -------------------------------- ### Basic `ebook-convert` Usage Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Demonstrates the fundamental syntax for using `ebook-convert` to convert an input e-book file to an output file. The output format is determined by the output file's extension. Special output formats like `.EXT` allow deriving the output filename from the input. If the output file is specified as a folder, an OEB (Open E-book) is created within that folder. ```shell ebook-convert input_file output_file [options] ``` -------------------------------- ### Listing Built-in Recipes Source: https://manual.calibre-ebook.com/generated/en/ebook-convert The `--list-recipes` option displays a list of available built-in recipes that can be used to create e-books from specific sources. You can then use a recipe name directly as the input file. ```shell ebook-convert --list-recipes ebook-convert "Recipe Name.recipe" output.epub ``` -------------------------------- ### MOBI Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing MOBI files as input for ebook conversion. ```APIDOC ## MOBI Input Options ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### LIT Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing LIT files as input for ebook conversion. ```APIDOC ## LIT Input Options ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### HTML Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing HTML files as input for ebook conversion. ```APIDOC ## HTML Input Options ### --allow-local-files-outside-root **Description**: Normally, resources linked to by the HTML file or its children will only be allowed if they are in a sub-folder of the original HTML file. This option allows including local files from any location on your computer. This can be a security risk if you are converting untrusted HTML and expecting to distribute the result of the conversion. **Method**: N/A (Command-line option) **Endpoint**: N/A ### --breadth-first **Description**: Traverse links in HTML files breadth first. Normally, they are traversed depth first. **Method**: N/A (Command-line option) **Endpoint**: N/A ### --dont-package **Description**: Normally this input plugin re-arranges all the input files into a standard folder hierarchy. Only use this option if you know what you are doing as it can result in various nasty side effects in the rest of the conversion pipeline. **Method**: N/A (Command-line option) **Endpoint**: N/A ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ### --max-levels **Description**: Maximum levels of recursion when following links in HTML files. Must be non-negative. 0 implies that no links in the root HTML file are followed. Default is 5. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### Displaying Version Information Source: https://manual.calibre-ebook.com/generated/en/ebook-convert The `--version` option displays the version number of the `ebook-convert` program. ```shell ebook-convert --version ``` -------------------------------- ### EPUB Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing EPUB files as input for ebook conversion. ```APIDOC ## EPUB Input Options ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### FB2 Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing FB2 files as input for ebook conversion. ```APIDOC ## FB2 Input Options ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ### --no-inline-fb2-toc **Description**: Do not insert a Table of Contents at the beginning of the book. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### PDB Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing PDB files as input for ebook conversion. ```APIDOC ## PDB Input Options ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### Specifying Output Profile Source: https://manual.calibre-ebook.com/generated/en/ebook-convert The `--output-profile` option enables optimization of the output document for specific devices. While not always necessary, it can tailor the e-book for better viewing on selected devices. A list of supported output profiles is available. ```shell ebook-convert input.txt output.epub --output-profile ipad ``` -------------------------------- ### ebook-convert Command Line Usage Source: https://manual.calibre-ebook.com/generated/en/ebook-convert This section details the basic usage of the ebook-convert command, including input and output file specifications and how to access help for format-specific options. ```APIDOC ## `ebook-convert` Command Line Tool ### Description Converts an e-book from one format to another. Specify the input and output files as the first two arguments. The output format is determined by the output file's extension. You can also use a special `.EXT` format for the output file to derive the output filename from the input filename. ### Method Command Line Tool ### Endpoint N/A (Command Line Utility) ### Parameters #### Path Parameters - **input_file** (string) - Required - The path to the input e-book file. - **output_file** (string) - Required - The path for the output e-book file. The extension determines the output format. Can also be `.EXT` to derive the output filename. #### Query Parameters None #### Request Body None ### Request Example ```bash ebook-convert input.epub output.mobi ebook-convert "My Book.txt" .azw3 ``` ### Response #### Success Response (200) N/A (Command Line Utility) #### Response Example N/A (Command Line Utility) ## Accessing Format-Specific Options To get detailed help on options specific to the input and output formats, use the `-h` flag after specifying the input and output files: ```bash ebook-convert myfile.input_format myfile.output_format -h ``` ## Global Options These options apply to all conversion processes. ### --help, -h Show this help message and exit. ### --input-profile Specify the input profile to help the conversion system interpret the input document correctly. Supported profiles include: `cybookg3`, `cybook_opus`, `default`, `hanlinv3`, `hanlinv5`, `illiad`, `irexdr1000`, `irexdr800`, `kindle`, `msreader`, `mobipocket`, `nook`, `sony`, `sony300`, `sony900`. ### --list-recipes List available builtin recipe names. You can create an e-book from a recipe using: ```bash ebook-convert "Recipe Name.recipe" output.epub ``` ### --output-profile Specify the output profile to optimize the created document for a specific device. Supported profiles include: `cybookg3`, `cybook_opus`, `default`, `generic_eink`, `generic_eink_hd`, `generic_eink_large`, `hanlinv3`, `hanlinv5`, `illiad`, `ipad`, `ipad3`, `irexdr1000`, `irexdr800`, `jetbook5`, `kindle`, `kindle_dx`, `kindle_fire`, `kindle_oasis`, `kindle_pw`, `kindle_pw3`, `kindle_scribe`, `kindle_voyage`, `kobo`, `msreader`, `mobipocket`, `nook`, `nook_color`, `nook_hd_plus`, `pocketbook_inkpad3`, `pocketbook_lux`, `pocketbook_hd`, `pocketbook_900`, `pocketbook_pro_912`, `galaxy`, `sony`, `sony300`, `sony900`, `sony-landscape`, `sonyt3`, `tablet`. ### --version Show the program's version number and exit. ## Important Notes - Enclose arguments with spaces in quotation marks (e.g., `"/some path/with spaces"`). - The available options significantly depend on the input and output file types. ``` -------------------------------- ### Epub Conversion Options Source: https://manual.calibre-ebook.com/generated/en/calibredb This section details the various command-line options available for customizing the generation of EPUB (and other formats like AZW3, MOBI) output, including catalog generation, metadata, and content inclusion rules. ```APIDOC ## Epub Options ### --catalog-title **Description**: Title of the generated catalog used in metadata. Defaults to 'My Books'. **Applies To**: AZW3, EPUB, MOBI ### --cross-reference-authors **Description**: Creates cross-references in the Authors section for books with multiple authors. Defaults to 'False'. **Applies To**: AZW3, EPUB, MOBI ### --debug-pipeline **Description**: Saves output from different conversion pipeline stages to a specified folder for debugging. Defaults to 'None'. **Applies To**: AZW3, EPUB, MOBI ### --exclude-genre **Description**: A regular expression describing tags to exclude as genres. Defaults to '[.+]$|^+$'. Excludes bracketed tags and the default tag for read books ('+'). **Applies To**: AZW3, EPUB, MOBI ### --exclusion-rules **Description**: Specifies rules for excluding books from the generated catalog. Rules can be based on tags or custom columns. All defined rules are applied. Defaults to `((`'Catalogs'`,`'Tags'`,`'Catalog'`'),)`. **Applies To**: AZW3, EPUB, MOBI ### --generate-authors **Description**: Includes an 'Authors' section in the catalog. Defaults to 'False'. **Applies To**: AZW3, EPUB, MOBI ### --generate-descriptions **Description**: Includes a 'Descriptions' section in the catalog. Defaults to 'False'. **Applies To**: AZW3, EPUB, MOBI ### --generate-genres **Description**: Includes a 'Genres' section in the catalog. Defaults to 'False'. **Applies To**: AZW3, EPUB, MOBI ### --generate-recently-added **Description**: Includes a 'Recently Added' section in the catalog. Defaults to 'False'. **Applies To**: AZW3, EPUB, MOBI ### --generate-series **Description**: Includes a 'Series' section in the catalog. Defaults to 'False'. **Applies To**: AZW3, EPUB, MOBI ### --generate-titles **Description**: Includes a 'Titles' section in the catalog. Defaults to 'False'. **Applies To**: AZW3, EPUB, MOBI ### --genre-source-field **Description**: Specifies the source field for the 'Genres' section. Defaults to 'Tags'. **Applies To**: AZW3, EPUB, MOBI ### --header-note-source-field **Description**: Specifies a custom field containing note text to insert in the Description header. Defaults to ''. **Applies To**: AZW3, EPUB, MOBI ### --merge-comments-rule **Description**: Rule for merging comments with notes from a custom field. Format: `#:[before|after]:[True|False]`. Defaults to '::'. **Applies To**: AZW3, EPUB, MOBI ### --output-profile **Description**: Specifies the output profile to optimize the catalog for specific devices (e.g., 'kindle'). Defaults to 'None'. **Applies To**: AZW3, EPUB, MOBI ### --prefix-rules **Description**: Specifies rules for including prefixes for read books, wishlist items, etc. The first matching rule is used. Defaults to `((`'Read books'`,`'tags'`,`'+'`,`'✓'`'),(`'Wishlist item'`,`'tags'`,`'Wishlist'`,`'×'`'))`. **Applies To**: AZW3, EPUB, MOBI ### --preset **Description**: Uses a named preset created with the GUI catalog builder. Defaults to 'None'. **Applies To**: AZW3, EPUB, MOBI ### --thumb-width **Description**: Size hint (in inches) for book covers in the catalog. Range: 1.0 - 2.0. Defaults to '1.0'. **Applies To**: AZW3, EPUB, MOBI ### --use-existing-cover **Description**: Replaces the existing cover when generating the catalog. Defaults to 'False'. **Applies To**: AZW3, EPUB, MOBI ``` -------------------------------- ### DOCX Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing DOCX files as input for ebook conversion. ```APIDOC ## DOCX Input Options ### --docx-inline-subsup **Description**: Render superscripts and subscripts so that they do not affect the line height. **Method**: N/A (Command-line option) **Endpoint**: N/A ### --docx-no-cover **Description**: Normally, if a large image is present at the start of the document that looks like a cover, it will be removed from the document and used as the cover for created e-book. This option turns off that behavior. **Method**: N/A (Command-line option) **Endpoint**: N/A ### --docx-no-pagebreaks-between-notes **Description**: Do not insert a page break after every endnote. **Method**: N/A (Command-line option) **Endpoint**: N/A ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### Specifying Input Profile Source: https://manual.calibre-ebook.com/generated/en/ebook-convert The `--input-profile` option allows you to specify how the conversion system should interpret information from the input document, such as resolution-dependent lengths. A list of supported input profiles is provided. ```shell ebook-convert input.epub output.mobi --input-profile kindle ``` -------------------------------- ### HTLZ Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing HTLZ files as input for ebook conversion. ```APIDOC ## HTLZ Input Options ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### ebook-polish Command Line Usage Source: https://manual.calibre-ebook.com/generated/en/ebook-polish The basic syntax for the `ebook-polish` command. It takes an input file and an optional output file, along with various options to modify the e-book. This tool is designed for formats like AZW3, EPUB, and KEPUB. ```shell ebook-polish [options] input_file [output_file] ``` -------------------------------- ### Show Help - calibre-customize Source: https://manual.calibre-ebook.com/generated/en/calibre-customize Displays the help message for the `calibre-customize` command, listing all available options and their usage. ```bash calibre-customize --help calibre-customize -h ``` -------------------------------- ### Show Version Option for ebook-polish Source: https://manual.calibre-ebook.com/generated/en/ebook-polish Displays the version number of the `ebook-polish` command-line tool and then exits. This is a standard option for identifying the software version. ```shell --version ``` -------------------------------- ### ODT Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing ODT files as input for ebook conversion. ```APIDOC ## ODT Input Options ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### fetch-ebook-metadata Options Source: https://manual.calibre-ebook.com/generated/en/fetch-ebook-metadata This section lists and describes the various command-line options available for the `fetch-ebook-metadata` tool. These options control which metadata sources are used, how to identify the book, whether to download a cover, the output format, and more. ```bash fetch-ebook-metadata --allowed-plugin | -p # Specify metadata download plugin fetch-ebook-metadata --authors | -a # Book author(s) fetch-ebook-metadata --cover | -c # Save cover to specified filename fetch-ebook-metadata --help | -h # Show help message fetch-ebook-metadata --identifier | -I # Specify identifiers like ASIN/Goodreads id fetch-ebook-metadata --isbn | -i # Book ISBN fetch-ebook-metadata --opf | -o # Output metadata in OPF format fetch-ebook-metadata --timeout | -d # Timeout in seconds fetch-ebook-metadata --title | -t # Book title fetch-ebook-metadata --verbose | -v # Print log to console fetch-ebook-metadata --version # Show program version ``` -------------------------------- ### Show Help Message Option for ebook-polish Source: https://manual.calibre-ebook.com/generated/en/ebook-polish Displays the help message for the `ebook-polish` command, outlining all available options and their usage. This is invoked using either the long or short form of the option. ```shell --help, -h ``` -------------------------------- ### LRF Input Options Source: https://manual.calibre-ebook.com/generated/en/ebook-convert Options specific to processing LRF files as input for ebook conversion. ```APIDOC ## LRF Input Options ### --input-encoding **Description**: Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations. **Method**: N/A (Command-line option) **Endpoint**: N/A ``` -------------------------------- ### Update Metadata from OPF File with ebook-polish Source: https://manual.calibre-ebook.com/generated/en/ebook-polish Allows `ebook-polish` to update the e-book's metadata using an external OPF (Open Packaging Format) file. This is useful for synchronizing book information from a central source. ```shell --opf, -o ``` -------------------------------- ### ebook-polish Source: https://manual.calibre-ebook.com/generated/en/ebook-polish The `ebook-polish` command is used to apply various optimizations and refinements to e-books in AZW3, EPUB, or KEPUB formats. It performs minimal changes to preserve the original structure while enhancing readability and reducing file size. This tool should be used as a final step in the e-book creation process. ```APIDOC ## ebook-polish ### Description Applies various optimizations and refinements to e-books in AZW3, EPUB, or KEPUB formats. Use as a final step in the e-book creation process. ### Method Command Line Tool ### Endpoint ebook-polish [options] input_file [output_file] ### Parameters #### Command Line Arguments - **input_file** (string) - Required - The path to the input e-book file. - **output_file** (string) - Optional - The path for the output e-book file. If not provided, the original file is overwritten. #### Options - **--add-soft-hyphens, -H** - Add soft hyphens to all words to improve justified text rendering in readers that do not support hyphenation. - **--compress-images, -i** - Losslessly compress images to reduce file size without affecting quality. - **--cover, -c** - Path to a cover image. Changes or inserts the cover image of the e-book. - **--download-external-resources, -d** - Download external resources (images, stylesheets) linked via URLs and embed them into the book. - **--embed-fonts, -e** - Embed all referenced fonts not already embedded. Scans the system for fonts; ensure proper licensing. - **--jacket, -j** - Insert a "book jacket" page at the beginning containing all book metadata. Replaces any existing jacket. - **--opf, -o** - Path to an OPF file. Updates the book's metadata from the specified OPF file. - **--remove-jacket** - Remove a previously inserted book jacket page. - **--remove-soft-hyphens** - Remove all soft hyphens from the text. - **--remove-unused-css, -u** - Remove unused CSS rules from stylesheets and `