Git Product home page Git Product logo

workflow's Introduction

Workflow - Quick prototyping script for creating rich html and pdfs from markdown documents

Workflow is a small script for generating nice-looking web pages and pdf documents from markdown using a CSS switcher. This means that creating a webpage or pdf is simply a matter of writing some content in markdown and choosing a CSS template, which can drastically reduce the amount of time required to put documentation online.

Requirements

Usage

Given a plain markdown document, Workflow by default will create an html file with an embedded switcher, allowing you to cycle interactively through a list of CSS templates to see which one works best with your document. You can try this by cloning or downloading the project and running the following command on this readme file from within the project directory:

/.workflow.rb README.md

Once you have decided on a CSS template, just run workflow.rb again with the -s option to generate a permanent file with your chosen CSS included:

./workflow.rb -s siimple README.md

Use the -p option to create a PDF using your selected CSS template:

./workflow.rb -ps siimple README.md

You can view an online demo or download a pdf which is the result of running the above commands.

Code highlighting

Syntax highlighting for code blocks uses pygments-css via the Pygments CSS Stylesheets Previewer.

Use the -c option to turn on syntax highlighting.

./workflow.rb -cps siimple README.md

To use a different highlighting theme than the default, specify a Pygments CSS style using the -C option. For example, to use the Solarized Light theme:

./workflow.rb -cps siimple -C solarized-light README.md

To see all the available syntax highlighting themes, take a look at the online style switcher for Pygments CSS, with sample code in a variety of programming languages.

Options

  • -c, --code-highlighting: Use code syntax highlighting
  • -C, --code-style [STYLE]: Specify style to use for syntax highlighting
  • -f, --fixes: Fixes some common display problems with pdfs
  • -h, --header TEXT: Add arbitrary header text to top of each pdf page
  • -o, --output NAME: Basename of output file (by default same as input file)
  • -p, --pdf: Create pdf instead of html
  • -n, --numbers: Add a footer with page numbers
  • -s, --stylesheet NAME: Specify name of stylesheet to use instead of CSS switcher

Related projects

License

MIT.

workflow's People

Contributors

dohliam avatar

Stargazers

Matt avatar Lennie Budgell avatar subL avatar  avatar  avatar

Watchers

 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.