Last active
November 7, 2023 00:47
-
-
Save teeparham/8a99e308884e1c32735a to your computer and use it in GitHub Desktop.
Convert rdoc to markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rdoc' | |
converter = RDoc::Markup::ToMarkdown.new | |
rdoc = File.read(ARGV[0] || 'README.rdoc') | |
puts converter.convert(rdoc) | |
# ruby rdoc2md.rb > README.md | |
# ruby rdoc2md.rb ABC.rdoc > abc.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias rdoc2md='ruby ~/.ruby/rdoc2md.rb $1' | |
# rdoc2md > README.md | |
# rdoc2md ABC.rdoc > ABC.md |
@atz Thanks for the one liner!
Thanks! I didn't get a perfect conversion, but it may have just been poor rdoc formatting to begin with.
@atz Thanks!
@atz Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One liner: