Skip to content

Turn YAML into documentation (md,html,pdf,doc etc)

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
licence.txt
Notifications You must be signed in to change notification settings

ted-dunstone/yaml2doc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yaml2doc (YAML to document)

Introduction

Convert YAML to documentation.

Particularly useful for documenting specifications or examples. Features:

  • Easily document your YAML
  • Convert to md,pdf,docx even pptx (anything supported by pandoc)
  • For pdf add left side margin notes
  • Through pandoc support allow title,date,author ..
  • Validates YAML using pyyaml - can insert validation date and status in documentation

Basically your comments in the YAML file can be turned into good looking documentation.

Requirements

Relies on the amazing pandoc for the document conversion. It will however run as a pure python yaml to markdown converter without pandoc (as it converts to md and then to pandoc)

How to use

This script takes all lines beginning with # as text-lines. All other lines are treated as “yaml”.

For each text the # is removed and the “code” will get spaces prepended.

Setup

pip3 install .

Usage

Once installed the package can be used from the commandline

usage: yamltodoc <infile.yaml> <outfile.[md|pdf|docx|pptx]>

The following will build an example report with the files in the "test" directory and the title as "a major report"

eg:

yamltodoc test/blueprint.yaml blueprint.pdf 

Acknowledgement

Derived from yaml2rst 0.3 which was a yaml to RST converter

About

Turn YAML into documentation (md,html,pdf,doc etc)

Topics

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
licence.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages