Arguments ========= Crowbook can take a number of arguments, generally in the form: ```bash crowbook [OPTIONS] [BOOK] ``` The most important argument is obviously the book configuration file. It is mandatory in most cases: if you don't pass it, Crowbook will simply display an error. In a normal use case this is the only argument you'll need to pass, as most options will be set in this configuration file. It is, however, possible to pass more arguments to `crowbook`: `--create` --------- **Usage**: `crowbook [BOOK] --create file_1.md file_2.md ...` (or `crowbook [BOOK] -c file_1.md file_2.md ...`) Creates a new book from a list of Markdown files. It will generate a book configuration file with all file names specified as chapters. It either prints the result to stdout (if `BOOK` is not specified) or generate the file `BOOK` (or abort if it already exists). ```bash crowbook foo.book --create chapter_1.md chapter_2.md chapter_3.md ``` will thus generate a file `foo.book` containing: ```yaml author: Your name title: Your title lang: en ## Output formats # Uncomment and fill to generate files # output.html: some_file.html # output.epub: some_file.epub # output.pdf: some_file.pdf # Or uncomment the following to generate PDF, HTML and EPUB files based on this file's name # output: [pdf, epub, html] # Uncomment and fill to set cover image (for EPUB) # cover: some_cover.png ## List of chapters + chapter_1.md + chapter_2.md + chapter_3.md ``` while ```bash crowbook --create chapter_1.md chapter_2.md chapter_3.md ``` will print the same result, but to stdout (without creating a file). `--single` ---------- **Usage**: `crowbook --single ` (or `crowbook -s `) This argument allows you to give `crowbook` a single Markdown file. This file can contain an inline YAML block to set some book options. Inline YAML blocks must start and end with a line containing only `---` (three dashes). E.g: ```yaml --- author: Joan Doe title: A short story output: [html, epub, pdf] --- Content of the story in Markdown. ``` If this YAML block is not at the beginning of a file, it must also be preceded by a blank line. This allows to not have to write a `.book` configuration file for a short story or an article. `crowbook -s foo.md` is rougly equivalent to having a book configuration file containing: ```yaml ! foo.md ``` That is, the chapter heading (if any) won't be displayed in the output documents (though they still appear in the TOC). > Note that by default, using `--single` or `-s` sets the default LaTeX class > of the book to `article` instead of `book`. `--set` ------- **Usage**: `crowbook --set [KEY] [VALUE]...` This argument takes a list of `KEY` `VALUE` pairs and allows setting or overriding a book configuration option. All valid options in the configuration files are valid as keys. For more information, see [the configuration file](config.md). ```bash $ crowbook foo.book --set tex.paper.size a4paper ``` will override the paper size for PDF generation. `--list-options` ---------------- **Usage**: `crowbook --list-options` (or `crowbook -l`) Displays all the valid options that can be used, whether in a book configuration file, with `--set`, or in an inline YAML block. `--print-template` ------------------ **Usage**: `crowbook --print-template