Sha256: cbaa5682f8e37000a2e8b588aad4f64b7b632e3b27d79c0c2b1f5f0ec8f742fe
Contents?: true
Size: 699 Bytes
Versions: 1
Compression:
Stored size: 699 Bytes
Contents
#!/usr/bin/env ruby require 'github/markdown' require 'hubdown/cli_parser' require 'hubdown/page_builder' require 'bcat' def init @file_name = ARGV.shift output = "" parser = CliParser.new parser.run ARGV mdown = create_mdown if parser.config[:output] || parser.config[:wrap] p = Hubdown::PageBuilder.new mdown page_data = p.get_page if parser.config[:output] File.open( parser.config[:output], "w" ) { |f| f.write page_data } end if parser.config[:wrap] output = page_data end else output = mdown end if output != "" puts output end end def create_mdown md = GitHub::Markdown.render_gfm File.read(@file_name) md end init
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hubdown-0.0.3 | bin/hubdown |