Skip to content

Instantly share code, notes, and snippets.

Last active September 22, 2022 11:07
What would you like to do?
Convert rdoc to markdown
require 'rdoc'
converter =
rdoc =[0] || 'README.rdoc')
puts converter.convert(rdoc)
# ruby rdoc2md.rb >
# ruby rdoc2md.rb ABC.rdoc >
alias rdoc2md='ruby ~/.ruby/rdoc2md.rb $1'
# rdoc2md >
# rdoc2md ABC.rdoc >
Copy link

atz commented Oct 29, 2015

One liner:

ruby -r rdoc -e 'puts[0] || "README.rdoc")' >

Copy link

nisanthchunduru commented Jun 21, 2017

@atz Thanks for the one liner!

Copy link

Thanks! I didn't get a perfect conversion, but it may have just been poor rdoc formatting to begin with.

Copy link

kojix2 commented Jan 29, 2019

@atz Thanks!

Copy link

tunggnu commented Dec 25, 2020

@atz Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment