Package: redtape
redtaperedtapeis a focuseddocumentgenerator that usesgithub flavored markdownto generate simple, attractive HTML documents.  It automatically integrates withtwitter bootstrapand features simple, attractive styling.  It is inspired byd, but attempts to have a simple interface while still allowing users to style
and control their output documents to a high degree of customization.installingIf you are on linux or OSX, you can usepipto install:> pip install redtapeWhich will install redtape and its dependencies.usageTo use, runrton a document or directory full of documents.  If run on
a directory,rtwill create html files for every markdown file (.md,.mdown, or.markdownextensions):> rt mydocument.md
> rt documentation/assetsBy default,rtassumes you have set up a location to serve the files from
which have the assets thatrtlinks into these documents.  The layout is
exactly the same as theassets directoryin the redtape repository:/assets/{css,img,js}/..for each asset that you will be using.  If you want
to use redtape’s default assets, you can easily create a suitable asset
directory in the current directory by running:> rt --create-assetsIf you are running in single document mode or do not wish to set up an asset
directory on the eventual host for your HTML documents, you can tell redtape to
embed each asset used in a document by using--embed:> rt --embed mydocument.mdjavascriptBy default,redtapenot require any javascript to run, and will not embed
any in--embedmode.  If the--prettifyoption is selected, google’s
prettify library will be used for source highlighting instead ofpygments,
and if--prettifyand--embedare both used, it will be automatically
embedded.Redtape is also suitable for simple single-page javascript demonstrations, and
if--use-jsis enabled, redtape will includejqueryand bootstrap’s
javascript libraries.customizing outputCustomizing output is easy to do in a variety of ways.  Besides changing the
asset CSS for non-embedded documents, you can also add headers and footers or
even use custom document templates based on redtape’s default template.headers and footersIf you have a customized document header or footer you want added to your
documents, you can either addheader.htmlandfooter.htmldocuments
to the base directory you are rendering or set default paths to be used
in the config asheaderandfooter.  By default, these will be
placed at the top and bottom of your document, respectively.A sample set of documents could be:> ls mydocs/
mydocs/index.md       mydocs/simple.md      mydocs/advanced.md
mydocs/header.html    mydocs/footer.htmlRendering mydocs withrt mydocswill use the header and footer for each
document in the directory.custom templatesIf you have very specific requirements, you can write your own document
template and have total control of the output.  Redtape uses thejinja2templating engine, which is a widely used templating system similar to
django templates.  Run redtape with the--contextargument to get a brief
idea of what variables are available to the template.You can also inherit frombasic.jinja, which is the name of redtape’s
default template.  This template defines two blocks,headandbody,
which would allow you to craft a distinct document body while, for instance,
retaining the basic CSS and JavaScript functionality of redtape.  Overriding
both will leave you with a standard HTML5 document structure.You can specify a custom template to use with-t,--templateor place
it in the document directory ascustom.htmlorcustom.jinja.sample output