#!/usr/bin/env ruby # Usage: rdiscount [...] # Convert one or more Markdown files to HTML and write to standard output. With # no or when is '-', read Markdown source text from standard input. if ARGV.include?('--help') File.read(__FILE__).split("\n").grep(/^# /).each do |line| puts line[2..-1] end exit 0 end require 'rdiscount' STDOUT.write(RDiscount.new(ARGF.read).to_html)