Redcloth::Formatters::Rdoc
A RedCloth formatter that enables to convert .textile
files to .rdoc
files. This is useful for compiling a README.textile
into a README.rdoc
file and use it as the main index file in the corresponding RDoc documentation.
Installation
Add this line to your application’s Gemfile:
gem 'redcloth-formatters-rdoc'
And then execute:
$ bundle
Or install it yourself as:
$ gem install redcloth-formatters-rdoc
Usage
# Compile the readme to the rdoc format
readme_textile = File.open('README.textile', 'r+'){ |file| file.read }
readme_rdoc = RedCloth.new(readme_textile).to_rdoc
File.open('README.rdoc', 'w+'){ |file| file.write(readme_rdoc) }</code>
<code># Create rdoc with the readme as main file
`rdoc --main README.rdoc`</code>
<code># Clean up the rdoc file
File.delete("README.rdoc")
Contributing
1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am ‘Added some feature’`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request