Giter VIP home page Giter VIP logo

pandoku's Introduction

Pandoku

Pandoku is a loose Ruby interface for Pandoc, the most powerful markup processor written in Haskell.

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki markup, groff man pages, and S5 HTML slide shows.

Installation

Before install Pandoku, you should install Pandoc. If Haskell platform is installed on your system, you should just use cabal tool.

cabal install pandoc

Pandoku gem is distributed with Gemcutter.

gem install gemcutter
gem tumble
gem install pandoku

Simple Way

It defines String#pandoku method.

require 'pandoku'
doc = <<MKD
Pandoku
=======

[Pandoku][] is loose Ruby interface for [Pandoc][].

[pandoku]: http://github.com/lunant/pandoku
[pandoc]: http://johnmacfarlane.net/pandoc/
MKD
puts doc.pandoku(:markdown => :html)

Above code prints following HTML:

<div id="pandoku"
><h1
>Pandoku</h1
><p
><a href="http://github.com/lunant/pandoku"
  >Pandoku</a
  > is loose Ruby interface for <a href="http://johnmacfarlane.net/pandoc/"
  >Pandoc</a
  >.</p
></div
>

Path Of Pandoc

You should export the environment variable PANDOC_PATH when the executable binary of Pandoc is not in PATH.

export PANDOC_PATH="$HOME/.cabal/bin/pandoc"

Or you can define the constant Pandoku::PANDOC_PATH before require 'pandoku'.

module Pandoku; PANDOC_PATH = "#{ENV['HOME']}/.cabal/bin/pandoc"; end
require 'pandoku'

Web Sites

The source code of Pandoku is available on GitHub. It is also an offical page of Pandoku.

http://github.com/lunant/pandoku

The Gem package is distributed on Gemcutter.

http://gemcutter.org/gems/pandoku

See the respectable original project Pandoc also.

http://johnmacfarlane.net/pandoc/

There is a good alternative Ruby interface to Pandoc from a different angle.

http://github.com/autodata/pandoc-ruby

Author

Hong Minhee (洪民憙)
http://dahlia.kr/
[email protected]

pandoku's People

Contributors

dahlia avatar

Stargazers

 avatar Aaron McAdam avatar Eduardo Lipolis Ribera avatar Robert avatar rekado avatar  avatar Boticello avatar

Watchers

 avatar James Cloos 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.