Giter VIP home page Giter VIP logo

mkbook's Introduction

Written in 2010-2016 by Pieter Hintjens, [email protected], unless otherwise specified.

To the extent possible under law, the author has dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.

You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see:

<http://creativecommons.org/publicdomain/zero/1.0/>.

=========================================================================

These are the tools I use to build my books. They are not packaged or documented for public use. I'm not accepting pull requests or patches at this stage.

  • To install, you need all the tools in bin/, somewhere on your path. I suggest copying them to /usr/local/bin.

  • To use, take the directory example/, and copy to a new directory that represents your book project.

Required Linux packages:

  • rasterizer
  • pygmentize
  • Perl Tree::Trie

Workflow

Edit each chapter as a file chnn.txt

run ./build in produce

this produces ODF, HTML, MD files

for printable PDF, load ODF in LibreOffice and save as PDF/A-a1.

For an index, set the INDEX variable in the .book file to a file (index.txt is an example) containing one keyword per line. To create categories, write "word | category".

E.g.

belgium | country
canada | country

The templating system works by inserting symbols from the .book file into templates. There are a few symbols known to the mkodt script: FILENAME, INDEX, BREAKS, INSIDE, OUTSIDE, HRIGHT. The others are only known to the templates.

Model Document

To check/modify the ODT templates, you have to know how to expand an ODT file using unzip, then you can copy/paste code from the various ODT sub files into the templates.

The model directory contains a model.odt that you can use for this purpose.

To format an XML file to be readable:

xmllint --pretty 1 somefile.xml > x && mv x somefile.xml

mkbook's People

Contributors

hintjens avatar

Watchers

James Cloos avatar Jeroen Wiert Pluimers avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.