The gem extends RedCloth with a DocBook formatter.

It might be used in conjunction with Booky to create fully blown PDFs out of textiles.

Install

Simply run gem install redcloth-formatters-docbook

Usage

require 'rubygems'
require 'RedCloth'
require 'redcloth-formatters-docbook'</code>

<code>textile = File.open("your.textile", 'rb') { |f| f.read }
docbook = RedCloth.new(textile).to_docbook
puts docbook
=> "
<?xml version="1.0" encoding="utf-8"?>
<book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0">
    <para>Hello</para>
</book>"