Crates.io | poetry-book-cli |
lib.rs | poetry-book-cli |
version | 0.1.4 |
source | src |
created_at | 2020-02-08 14:45:55.169564 |
updated_at | 2020-02-09 21:49:36.046851 |
description | poetry-book command line interface. Create a poetry book in latex from your terminal. |
homepage | |
repository | https://github.com/poetry-book/poetry-book-cli |
max_upload_size | |
id | 206369 |
size | 32,810 |
Poetry-book Command line interface.
Create a latex poetry book starting from poems written in plain text files.
$ cargo install poetry-book-cli
USAGE:
poetry-book-cli <book-dir>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<book-dir> The path of the book directory
The directory structure that contains the input of the program looks like this:
.
├── book.json
├── poems/
│ ├── A Silvia
│ ├── La ginestra.txt
│ └── L'infinito
└── Preface.txt
book.json
file has the following format:
{
"author": "Giacomo Leopardi",
"title": "Leopardi's poetry book",
"toc_title": "Table of Contents",
"language": "Italian",
"preface": "Preface.txt",
"poem_formatting": {
"centered_verse": "average"
},
"poems": [
"La ginestra.txt",
"L'infinito",
"A Silvia"
]
}
Poems are just plain text files, with an empty line between stanzas. The name of the file (without extension) is the poem title, the content of the file is the poem body.
Preface is just a plain text file, with an empty line between paragraphs. The name of the file (without extension) is the preface title, the content of the file is the preface body.
When you run the executable, the output is places in the out/
directory.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.