Sha256: 7126093e2cac55277bd3cbc4a9973e067ccce5910d10e7dc993a84dab86e406c

Contents?: true

Size: 473 Bytes

Versions: 2

Compression:

Stored size: 473 Bytes

Contents

#!/usr/bin/env ruby
require "sixarm_ruby_markdown_table_of_contents"
begin
  settings = SixArm::Markdown::TOC::Settings.new
  settings.option_parsing
  generator = SixArm::Markdown::TOC::Generator.new(settings: settings)
  ARGV.each{|markdown_file_path| 
    file = SixArm::Markdown::File.new(markdown_file_path)
    input = file.slurp
    output = generator.rewrite_toc(input)
    file.rewrite(output)
  }
  exit 0
rescue
  STDERR.puts "Error! " + $!.message
  exit 1
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sixarm_ruby_markdown_table_of_contents-2.5.1 bin/markdown-table-of-contents
sixarm_ruby_markdown_table_of_contents-2.4.0 bin/markdown-table-of-contents