Skip to content

Instantly share code, notes, and snippets.

View devonoel's full-sized avatar

Devon Noel de Tilly devonoel

View GitHub Profile
@devonoel
devonoel / rdoc2md.rb
Last active August 29, 2015 14:13 — forked from teeparham/rdoc2md.rb
require 'rdoc'
converter = RDoc::Markup::ToMarkdown.new
filename = ARGV[0] || 'README.rdoc'
rdoc = File.read(filename)
md = converter.convert(rdoc)
filename_raw = filename.split('.')[0]
File.open("#{filename_raw}.md", 'w') { |file| file.write(md) }
# ruby rdoc2md.rb >> README.md
# ruby rdoc2md.rb ABC.rdoc >> abc.md