Skip to content

Readme rdoc to markup conversion #595

Closed
wants to merge 1 commit into from

4 participants

@burningTyger
Sinatra member

Note: This is not a final PR

I have converted the README.rdoc to Markdown via rdoc:

require 'bundler'
gem "rdoc", "~> 4.0.0.preview2.1"

require 'rdoc'
require 'rdoc/markup'

h = RDoc::Markup::ToMarkdown.new
file = File.read "README.rdoc"
out = h.convert(file)

File.open('README.md', 'w') { |file| file.write(out) }

So this is a rather simple conversion path but it has a couple of issues:

  • easy so solve: Links are output as {DSL}[http://en.wikipedia.org/wiki/Domain-specific_language] (fixed in preview 3 of Rdoc)
  • definitions don't exist in Markdown
  • tables don't exist in Markdown

The links can easy be fixed by hand (filed a bug report at rdoc), the latter two need to be resolved with an alternative style. Any ideas?

EDIT: I added the first couple of lines since ToMarkdown is an Rdoc 4 feature and preview 3 is not yet released which has a bug fix for the broken links.

@jhwist
jhwist commented Jan 9, 2013

What's the status on this one? Are you still working on it or is there something someone else could do?

@rkh
Sinatra member
rkh commented Jan 9, 2013

I'm +1 on it, but not in the current state.

@burningTyger
Sinatra member

Just wanted to get some feedback on this first, I haven't done much since.

Personally I like the rdocs better — you get tables for free. I anybody wants to pick up from here and convert the tables manually, please go ahead and continue with this pr :thumbsup:

@kgrz
Sinatra member
kgrz commented Jan 9, 2013

#607

Here's a PR for the conversion. Skipped the tables part. Used blockquotes in place of definitions.

@rkh rkh closed this Jan 20, 2013
@dparnell dparnell pushed a commit to dparnell/schema_plus that referenced this pull request May 15, 2014
@ronen ronen convert README from rdoc to md
using

   require 'bundler'
   gem "rdoc", ">= 4.0.0.preview2.1"

   require 'rdoc'
   require 'rdoc/markup'

   h = RDoc::Markup::ToMarkdown.new
   file = File.read "README.rdoc"
   out = h.convert(file)

   File.open('README.md', 'w') { |file| file.write(out) }

as suggested in sinatra/sinatra#595
36fc799
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.