Poetry book cli

Crates.io CI unsafe forbidden

Poetry-book Command line interface.

Create a latex poetry book starting from poems written in plain text files.

Install

$ cargo install poetry-book-cli

Usage

``` USAGE: poetry-book-cli

FLAGS: -h, --help Prints help information -V, --version Prints version information

ARGS: The path of the book directory ```

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

book.json file has the following format:

json { "author": "Giacomo Leopardi", "title": "Leopardi's poetry book", "toc_title": "Table of Contents", "language": "Italian", "preface": "Preface.txt", "poems": [ "La ginestra.txt", "L'infinito", "A Silvia" ] }

The fields toc_title, preface and language are optional.

Poems

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

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.

Output

When you run the executable, the output is places in the out/ directory.

License

Licensed under either of

at your option.

Contribution

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.