simple PDF output for docco
Just an example script and templates.
The example script checks out some git repos. Some are for the needed tempate, some are just example content.
-
Covert the source code to markdown (
docco
)docco
converts your source code by seperating the code (the programm) from the comments- code is outputed in HTML
<pre>
elements (plus syntax higlighting etc) - the comments are seperated, the comment markers (like
#
and//
) are removed and run through a markdown to HTML converter
- code is outputed in HTML
- since
docco
originally generates HTML (already converting the markdown), I made a very minimal template which outputs just plain markdown.- the code is just put into ``` "code fences", which are supported by pandoc (and github!)
- the comments just have their marker removed and are otherwise untouched (since markdown conversion is handled by pandoc)
-
Convert the generated markdown to PDF
pandoc
can output to not just HTML, but also LaTeX and directly to PDF (you'll still need a LaTeX installation, for the minimum ask your package manager forpdflatex
.)- there are lots of options and flags, you can use the example script as a starting point
- docco.pdf
- backbone.pdf
- coffeescript's scope.js
- underscore.pdf