Giter Site home page Giter Site logo

pantoc's Introduction

Pantoc

Parse a table of content to build a splitted document in mardown. Nice tool for pandoc

Installation

Download released binary at on github.

Or use "go get -u":

$ go get -u github.com/metal3d/pantoc
$ pantoc -h

Usage

Usage of pantoc:
  -tocfile="toc.yaml": YAML file that describes table of contents

Yaml format

Create a yaml file inside your document tree. The Yaml file should define a list ! That means that you have to prefix document part with a "minus" sign.

Example

- Introduction: src/intro.md
- Title for chapter 2: src/part2.md #a only one file for that chapter
- Title for other part:
    - src/intro_part_3 # this will be included without title
    - Sub part: src/subpart1.md # title is "Sub part" and file is included
    - Sub part2: src/subpart2.md # as above

Each key becomes the title, each file path are appended after title.

You can now try to build your document:

pantoc

If you named your tocfile with a different name:

pantoc -tocfile=mytoc.yaml

The command should print the entire document to STDOUT (your terminal).

Use it with pandoc:

# if you have toc.yaml
pandoc <(pantoc) -o book.pdf

# with another file
pandoc <(pantoc -tocfile=mytoc.yaml) -o book.pdf

You may have the book.pdf file that respect you table of content and with included content.

pantoc's People

Contributors

metal3d avatar

Stargazers

somename123 avatar

Watchers

James Cloos 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.