Sha256: ed7505a800e65748bb00456e7f1d96f4d5d1b2a04f2420b82d91d6a91ba9165d

Contents?: true

Size: 723 Bytes

Versions: 22

Compression:

Stored size: 723 Bytes

Contents

#!/usr/bin/env ruby

HELP = <<-help
  Usage: gfm [--readme | --plaintext] [<file>]
  Convert a GitHub-Flavored Markdown file to HTML and write to standard output.
  With no <file> or when <file> is '-', read Markdown source text from standard input.
  With `--readme`, the files are parsed like README.md files in GitHub.com. By default,
  the files are parsed with all the GFM extensions.
help

if ARGV.include?('--help')
  puts HELP
  exit 0
end

root = File.expand_path('../../', __FILE__)
$:.unshift File.expand_path('lib', root)

require 'github/markdown'

mode = :gfm
mode = :markdown if ARGV.delete('--readme')
mode = :plaintext if ARGV.delete('--plaintext')

STDOUT.write(GitHub::Markdown.to_html(ARGF.read, mode))

Version data entries

22 entries across 21 versions & 3 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/github-markdown-0.6.9/bin/gfm
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/github-markdown-0.6.9/bin/gfm
tdiary-5.0.4 vendor/bundle/gems/github-markdown-0.6.9/bin/gfm
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/github-markdown-0.6.9/bin/gfm
github-markdown-0.6.9 bin/gfm
github-markdown-0.6.8 bin/gfm
github-markdown-0.6.7 bin/gfm
github-markdown-0.6.6 bin/gfm
github-markdown-jekyll-0.7.0 bin/gfm
github-markdown-0.6.5 bin/gfm
github-markdown-0.6.4 bin/gfm
github-markdown-0.6.3 bin/gfm
github-markdown-0.6.2 bin/gfm
github-markdown-0.6.1 bin/gfm
github-markdown-0.6.0 bin/gfm
github-markdown-0.5.5 bin/gfm
github-markdown-0.5.4 bin/gfm
github-markdown-0.5.3 bin/gfm
github-markdown-0.5.2 bin/gfm
github-markdown-0.5.1 bin/gfm