Remove comments and rename binary to brochurise

This commit is contained in:
southerntofu 2020-09-12 19:58:09 +02:00
parent 46386c8e46
commit a9951ab37e
4 changed files with 40 additions and 5 deletions

2
Cargo.lock generated
View File

@ -42,7 +42,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]]
name = "brochurise-rs"
name = "brochurise"
version = "0.1.0"
dependencies = [
"anyhow",

View File

@ -1,5 +1,5 @@
[package]
name = "brochurise-rs"
name = "brochurise"
version = "0.1.0"
authors = ["southerntofu <southerntofu@thunix.net>"]
edition = "2018"

38
README.md Normal file
View File

@ -0,0 +1,38 @@
# brochurise
`brochurise` allows you to produce PDF documents from your Markdown. It can generate a linear output and/or an A5 booklet so it can be easily printed. Multiple documents are generated to find the optimal font size, minimizing free space while ensuring the number of pages is a multiple of 4 so you can print your A5 booklets on A4 paper.
## Demo
You can run `cargo run -- example.md` to get the idea.
## Requirements
You need pandoc and a lateX environment. On Debian, you can do `sudo apt install pandoc texlive-extra-utils`. Additionally, some lateX templates may need additional packages. For example, the [eisvogel](https://github.com/Wandmalfarbe/pandoc-latex-template) template requires the `texlive-fonts-extra` package as well.
## Usage
```
USAGE:
brochurise [FLAGS] [OPTIONS] <input> [output]
FLAGS:
-b, --book Only produce an A5 booklet (4 pages per A4 sheet)
-d, --debug Enable debug output
-h, --help Prints help information
-l, --linear Only produce a linear A4 output
-V, --version Prints version information
OPTIONS:
-s, --size <size> The smallest size [default: 11]
ARGS:
<input> Path to the Markdown file to be brochurised
<output> Path to the PDF file to produce. When producing both linear and book output (default behavior,
unless -b or -l is set), `-book` will be appended to the booklet output path eg. output.pdf
and output-book.pdf
```
## License
GPLv3

View File

@ -40,9 +40,6 @@ struct Cli {
/// The smallest size
size: u8,
// pandoc::InputFormat does not implement FromStr so we can't use it here
//#[structopt(short = "v", long = "variant")]
//variant: pandoc::InputFormat,
}
fn main() -> Result<()> {