1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-11-15 13:53:05 +01:00
Converts books written in Markdown to HTML, LaTeX/PDF and EPUB
Go to file
2016-02-21 01:49:58 +01:00
book_example config.md: documented the option for including file with hiden chapter title 2016-02-20 19:23:02 +01:00
src experimental support for odt 2016-02-21 01:49:58 +01:00
templates experimental support for odt 2016-02-21 01:49:58 +01:00
tests tests now compile again 2016-02-19 16:27:41 +01:00
.gitignore now supports epub3 (in theory) 2016-02-20 03:41:29 +01:00
.travis.yml initial commit 2016-02-18 04:06:14 +01:00
Bugs.md updated bugs and current features 2016-02-20 18:51:32 +01:00
Cargo.toml Changed license to LGPL 2016-02-20 18:44:48 +01:00
ChangeLog.md added empty changelog 2016-02-20 17:24:07 +01:00
LICENSE.md license to license.md 2016-02-20 18:48:39 +01:00
README.md updated bugs and current features 2016-02-20 18:51:32 +01:00

Crowbook

Creates a book in HTML, Epub or PDF format from markdown files.

Build Status

Usage

The simplest command is:

$ crowbook <BOOK>
$ # or runninng from cargo:
$ cargo run <BOOK>

Where BOOK is a configuration file. Crowbook will then parse the config file and generate book in HTML, Epub, LaTeX, and/or PDF, according to the setting in the configuration file.

This configuration file contains some metadata, options, and list the Markdown files. Here is a basic example:

author: Joan Doe
title: Some book
lang: en

output_html: some_book.html

+ chapter_1.md
+ chapter_2.md
+ chapter_3.md
+ ...

For more information see the configuration file, or the whole book_example directory.

It is also possible to give additional paramaters to crowbook; arguments set from the command line will override the ones set in the BOOK configuration file.

USAGE:
        crowbook [FLAGS] [OPTIONS] <BOOK>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
    -v, --verbose    Activate verbose mode

OPTIONS:
        --autoclean <BOOL>    Try to clean input markdown [values: true, false]
        --numbering <BOOL>    Number chapters or not [values: true, false]
    -o, --output <FILE>       Specify output file
    -t, --to <FORMAT>         Generate specific format [values: epub, epub, pdf, html, tex]

ARGS:
    <BOOK>    A file containing the book configuration

Command line options allow to override options defined in <BOOK> configuration file. 
E.g., even if this file specifies 'verbose: false', calling 'crowbook --verbose <BOOK>' 
will activate verbose mode.

Note that Crowbook generates output files relatively to the directory where <BOOK> is:
$ crowbook foo/bar.book --to pdf --output baz.pdf
will thus generate baz.pdf in directory foo and not in current
directory.

Features

Done

  • Support for some simple formatconfiguration files to list chapters and metadatas, so you just run crowbook some_file and you don't have to pass more options, it generates the rest.
  • Support for Epub2 and Epub3 format as output.
  • Support for LaTeX format as output, and PDF through it.
  • Support for HTML format as output.
  • Support for basic french typography (i.e. non-breaking spaces) in HTML/Epub format.
  • Some configuration for HTML/Epub templates and CSS.

ToDo

  • Allow more customization.
  • Support for easily embedding custom fonts (and other files) in Epub/HTML.
  • Correct support for technical books.
  • Support for ODT as output format?

See also Bugs.

ChangeLog

See ChangeLog.

License

Crowbook is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL), version 2.1 or (at your option) any ulterior version. See LICENSE file for more information.

Acknowledgements

Besides the Rust compiler and standard library, Crowbook uses the following libraries:

While Crowbook directly doesn't use them, there was also inspiration from Pandoc and mdBook.