mirror of
https://github.com/lise-henry/crowbook
synced 2024-09-21 08:11:35 +02:00
Update documentation
This commit is contained in:
parent
3ee9e6f29c
commit
160f9a34dd
@ -172,6 +172,14 @@ $ crowbook my.book --set html.css my_style.css
|
|||||||
# or add "html.css: my_style.css" in my.book
|
# or add "html.css: my_style.css" in my.book
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`--stats`
|
||||||
|
|
||||||
|
**Usage**: `crowbook --stats <BOOK>`
|
||||||
|
|
||||||
|
(or `crowbook -S <BOOK>`)
|
||||||
|
|
||||||
|
Display some statistics (word and character counts) about the book.
|
||||||
|
|
||||||
`--verbose`
|
`--verbose`
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
100
guide/config.md
100
guide/config.md
@ -357,6 +357,40 @@ Current output options are:
|
|||||||
[Proofreading](proofreading.md), and interactive fiction,
|
[Proofreading](proofreading.md), and interactive fiction,
|
||||||
see [Interactive fiction](if.md).)
|
see [Interactive fiction](if.md).)
|
||||||
|
|
||||||
|
|
||||||
|
#### The `output` option ####
|
||||||
|
|
||||||
|
Setting output file names manually can be a bit tedious, and is not
|
||||||
|
always necessary. You can also specify a list of output formats with
|
||||||
|
the `output` option:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
output: [pdf, epub, html]
|
||||||
|
```
|
||||||
|
|
||||||
|
This is similar to the alternative syntax for YAML list:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
output:
|
||||||
|
- pdf
|
||||||
|
- epub
|
||||||
|
- html
|
||||||
|
```
|
||||||
|
|
||||||
|
This option will set default output path for PDF, EPUB and HTML
|
||||||
|
according to the book configuration file name. So, if your book is
|
||||||
|
`my_book.book` (or `my_book.md`), it will generate `my_book.pdf`,
|
||||||
|
`my_book.html` and `my_book.epub`.
|
||||||
|
|
||||||
|
> You can also infer the output file name by specifying "auto" to
|
||||||
|
> e.g. `output.html`. The previous example is thus equivalent to
|
||||||
|
>
|
||||||
|
> ```yaml
|
||||||
|
> output.pdf: auto
|
||||||
|
> output.epub: auto
|
||||||
|
> output.html: auto
|
||||||
|
> ```
|
||||||
|
|
||||||
#### `output.base_path` ####
|
#### `output.base_path` ####
|
||||||
|
|
||||||
Additionally, the `output.base_path` option allows you to set where
|
Additionally, the `output.base_path` option allows you to set where
|
||||||
@ -499,11 +533,10 @@ These options allow to embed additional files for some formats
|
|||||||
|
|
||||||
#### resources.files ####
|
#### resources.files ####
|
||||||
|
|
||||||
A list of files or directories that should be added. It's a
|
A list of files or directories that should be added.
|
||||||
whitespace-separated list, so it can be, e.g.:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
resources.files: font1.otf font2.otf
|
resources.files: [font1.otf, font2.otf]
|
||||||
```
|
```
|
||||||
|
|
||||||
It is also possible to specify a directory (or multiple
|
It is also possible to specify a directory (or multiple
|
||||||
@ -511,13 +544,13 @@ directories). So if you have a `fonts` directories containing
|
|||||||
`font1.otf` and `font2.otf`,
|
`font1.otf` and `font2.otf`,
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
resources.files: fonts
|
resources.files: [fonts]
|
||||||
```
|
```
|
||||||
|
|
||||||
will be equivalent to:
|
will be equivalent to:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
resources.files: fonts/font1.otf fonts/font2.otf
|
resources.files: [fonts/font1.otf, fonts/font2.otf]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -538,7 +571,7 @@ directory would be copied. So assuming `fonts/` contains `font1.otf`
|
|||||||
and `font2.otf`
|
and `font2.otf`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
resources.files: fonts
|
resources.files: [fonts]
|
||||||
resources.path: data
|
resources.path: data
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -548,7 +581,7 @@ will copy these two files to `data/fonts/font1.otf` and
|
|||||||
Similarly, the whole path of `resources.files` is copied, so
|
Similarly, the whole path of `resources.files` is copied, so
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
resources.files: fonts/font1.otf fonts/font2.otf
|
resources.files: [fonts/font1.otf, fonts/font2.otf]
|
||||||
```
|
```
|
||||||
|
|
||||||
will yield the same result.
|
will yield the same result.
|
||||||
@ -557,7 +590,8 @@ will yield the same result.
|
|||||||
|
|
||||||
## Full list of options ##
|
## Full list of options ##
|
||||||
|
|
||||||
Here is the complete list of options. You can always look at it by running `crowbook --list-options` or `crowbook -l`.
|
Here is the complete list of options. You can always look at it by
|
||||||
|
running `crowbook --list-options` or `crowbook -l`.
|
||||||
|
|
||||||
### Metadata ###
|
### Metadata ###
|
||||||
- **`author`**
|
- **`author`**
|
||||||
@ -604,6 +638,10 @@ Here is the complete list of options. You can always look at it by running `crow
|
|||||||
- Date the book was revised
|
- Date the book was revised
|
||||||
|
|
||||||
### Output options ###
|
### Output options ###
|
||||||
|
- **`output`**
|
||||||
|
- **type**: list of strings
|
||||||
|
- **default value**: `not set`
|
||||||
|
- Specify a list of output formats to render
|
||||||
- **`output.epub`**
|
- **`output.epub`**
|
||||||
- **type**: path
|
- **type**: path
|
||||||
- **default value**: `not set`
|
- **default value**: `not set`
|
||||||
@ -852,10 +890,26 @@ Here is the complete list of options. You can always look at it by running `crow
|
|||||||
- **type**: string
|
- **type**: string
|
||||||
- **default value**: `book`
|
- **default value**: `book`
|
||||||
- LaTeX class to use
|
- LaTeX class to use
|
||||||
- **`tex.paper_size`**
|
- **`tex.paper.size`**
|
||||||
- **type**: string
|
- **type**: string
|
||||||
- **default value**: `a5paper`
|
- **default value**: `a5paper`
|
||||||
- Specifies the size of the page.
|
- Specifies the size of the page.
|
||||||
|
- **`tex.margin.left`**
|
||||||
|
- **type**: string
|
||||||
|
- **default value**: `not set`
|
||||||
|
- Specifies left margin (note that with book class left and right margins are reversed for odd pages, thus the default value is 1.5cm for book class and 2cm else)
|
||||||
|
- **`tex.margin.right`**
|
||||||
|
- **type**: string
|
||||||
|
- **default value**: `not set`
|
||||||
|
- Specifies right margin(note that with book class left and right margins are reversed for odd pages, thus the default value is 2.5cm for book class and 2cm else)
|
||||||
|
- **`tex.margin.top`**
|
||||||
|
- **type**: string
|
||||||
|
- **default value**: `"2cm"`
|
||||||
|
- Specifies top margin
|
||||||
|
- **`tex.margin.bottom`**
|
||||||
|
- **type**: string
|
||||||
|
- **default value**: `"1.5cm"`
|
||||||
|
- Specifies left margin
|
||||||
- **`tex.title`**
|
- **`tex.title`**
|
||||||
- **type**: boolean
|
- **type**: boolean
|
||||||
- **default value**: `true`
|
- **default value**: `true`
|
||||||
@ -875,7 +929,7 @@ Here is the complete list of options. You can always look at it by running `crow
|
|||||||
|
|
||||||
### Resources option ###
|
### Resources option ###
|
||||||
- **`resources.files`**
|
- **`resources.files`**
|
||||||
- **type**: string
|
- **type**: list of strings
|
||||||
- **default value**: `not set`
|
- **default value**: `not set`
|
||||||
- Whitespace-separated list of files to embed in e.g. EPUB file; useful for including e.g. fonts
|
- Whitespace-separated list of files to embed in e.g. EPUB file; useful for including e.g. fonts
|
||||||
- **`resources.out_path`**
|
- **`resources.out_path`**
|
||||||
@ -930,6 +984,10 @@ Here is the complete list of options. You can always look at it by running `crow
|
|||||||
- **type**: boolean
|
- **type**: boolean
|
||||||
- **default value**: `true`
|
- **default value**: `true`
|
||||||
- Consider HTML blocks as text. This avoids having <foo> being considered as HTML and thus ignored.
|
- Consider HTML blocks as text. This avoids having <foo> being considered as HTML and thus ignored.
|
||||||
|
- **`crowbook.markdown.superscript`**
|
||||||
|
- **type**: boolean
|
||||||
|
- **default value**: `false`
|
||||||
|
- If enabled, allow support for superscript and subscript using respectively foo^up^ and bar~down~ syntax.
|
||||||
- **`crowbook.temp_dir`**
|
- **`crowbook.temp_dir`**
|
||||||
- **type**: path
|
- **type**: path
|
||||||
- **default value**: ``
|
- **default value**: ``
|
||||||
@ -966,6 +1024,14 @@ Here is the complete list of options. You can always look at it by running `crow
|
|||||||
- **type**: integer
|
- **type**: integer
|
||||||
- **default value**: `8081`
|
- **default value**: `8081`
|
||||||
- Port to connect to languagetool-server
|
- Port to connect to languagetool-server
|
||||||
|
- **`proofread.grammalecte`**
|
||||||
|
- **type**: boolean
|
||||||
|
- **default value**: `false`
|
||||||
|
- If true, try to use grammalecte server to grammar check the book
|
||||||
|
- **`proofread.grammalecte.port`**
|
||||||
|
- **type**: integer
|
||||||
|
- **default value**: `8080`
|
||||||
|
- Port to connect to grammalecte server
|
||||||
- **`proofread.repetitions`**
|
- **`proofread.repetitions`**
|
||||||
- **type**: boolean
|
- **type**: boolean
|
||||||
- **default value**: `false`
|
- **default value**: `false`
|
||||||
@ -994,8 +1060,12 @@ Here is the complete list of options. You can always look at it by running `crow
|
|||||||
|
|
||||||
Note that these options have a type, which in most case should be
|
Note that these options have a type, which in most case should be
|
||||||
pretty straightforward (a boolean can be `true` or `false`, an integer
|
pretty straightforward (a boolean can be `true` or `false`, an integer
|
||||||
must be composed by a number, a string is, well, any string). The `path`
|
must be composed by a number, a string is, well, any string (note that
|
||||||
type might puzzle you a
|
you might need to use quotes if it includes some characters that may
|
||||||
bit, but it's equivalent to a string, except Crowbook will consider it
|
lead the YAML parser to read it as an array, an integer or a list), and a
|
||||||
relatively to the book file. The `template path` type is just the
|
list of strings is a list containing only strings). The `path`
|
||||||
`path` of a template. Metadata are just strings.
|
type might puzzle you a bit, but it's equivalent to a string, except
|
||||||
|
Crowbook will consider it relatively to the book file. The `template
|
||||||
|
path` type is just the `path` of a template. Metadata are just
|
||||||
|
strings.
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ author: Me
|
|||||||
cover: cover.png
|
cover: cover.png
|
||||||
output.epub: book.epub
|
output.epub: book.epub
|
||||||
|
|
||||||
resources.files: my_font.ttf
|
resources.files: [my_font.ttf]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user