项目作者: raven-os

项目描述 :
Raven's PDF Generator
高级语言: Python
项目地址: git://github.com/raven-os/doc-generator.git
创建时间: 2018-01-15T03:13:22Z
项目社区:https://github.com/raven-os/doc-generator

开源协议:

下载


Raven PDF Generator

This project aims to facilitate the creation of Raven stylized PDF files from Markdown.

It uses Pandoc with a modified template from this one.

Requirement

Dependencies:

  • Python3
  • Pandoc

Run the following command to download the required python modules:

  1. pip install -r ./requirement.txt

Howto

To generate a pdf document from a markdown file:

  1. ./doc-generator.py -f input.md output.pdf

To generate a pdf document from an url:

  1. ./doc-generator.py -u http://input.md output.pdf

The document must start with some metadata that must follow this pattern:

  1. ---
  2. title: "Document Title"
  3. accountant: [John Doe]
  4. version: 1.0.0
  5. history: [
  6. {
  7. author: "John Doe",
  8. date: "27 Oct 2017",
  9. version: "1.0.0",
  10. sections: "All document",
  11. comments: "Fixed some typos",
  12. },
  13. {
  14. author: "John Doe",
  15. date: "28 Oct 2018",
  16. version: "1.1.0",
  17. sections: "1.3",
  18. comments: "Added section 1.3: installation guide",
  19. },
  20. ]
  21. lang: fr-FR
  22. ...

The document can contain an abstract between the Abstract and EndAbstract headers:

  1. #Abstract
  2. This is the abstract of the document
  3. #EndAbstract
  4. #1. Part One
  5. Content of part one

Bugs?

Did you find any bugs? Feel free to fill an issue!