Sha256: 8c620094b431c3fe50886c6814d2d1aca6360781877aa5c7ad8c55f191baca9b
Contents?: true
Size: 499 Bytes
Versions: 1
Compression:
Stored size: 499 Bytes
Contents
#!/usr/bin/env ruby require "sixarm_ruby_markdown_table_of_contents" begin markdown_file_path = ARGV.shift if nil == markdown_file_path then raise ArgumentError.new("This command needs an argument that is a markdown file path.") end file = Markdown::File.new(markdown_file_path) if nil == markdown_file_path then raise ArgumentError.new("This command needs a markdown file path that is a valid file.") end file.rewrite_toc exit 0 rescue STDERR.puts "Error! " + $!.message exit 1 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sixarm_ruby_markdown_table_of_contents-2.1.0 | bin/markdown-table-of-contents |