GithubHelp home page GithubHelp logo

markdown2pdf's Introduction

Convert Markdown documents to PDF

The script (markdown2pdf.sh) calls Multimarkdown to convert from Markdown to HTML. Then the HTML is rendered into a PDF through webkit by wkpdf. It uses a default CSS which resembles the one used on Apple Developer Documentation, but if a css style is specified in the document using the multimarkdown syntax, the script honors it instead.

The script is packaged into a droppable application with platypus.

Installation

Get the code

git clone git://github.com/jiho/Markdown2pdf.git
cd Markdown2pdf
git submodule init
git submodule update

If you live in a country not using A4 as the default paper size, open markdown2pdf.sh and change the default (to letter for example). It is set in the first lines of the script.

Install platypus.

Open Platypus' preferences and install the command line tool.

Install wkpdf dependencies

sudo gem install jeweler
sudo gem install trollop

Create the app (which will be put on your desktop)

./createApp.sh

Move the app wherever you want.

Finally, I recommend adding it to your Finder's title bar for easy drag and drop access.

Update

cd Markdown2pdf
git pull
git submodule update

./createApp.sh

Usage

Just drag and drop documents with extension md, markdown, txt, text, or mdown on the application. The resulting PDF should appear next to the markdown document.

Beware, if a PDF exists already, it will be silently overwritten

--

(c) Copyright 2011 JiHO GNU General Public License v3

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.