bin/markout in karmi-markout-0.1.0 vs bin/markout in karmi-markout-0.1.1
- old
+ new
@@ -19,10 +19,16 @@
"--format [FORMAT]",
"Output format (html, pdf)") do |f|
opts[:format] = f
end
+ o.on("-h",
+ "--history",
+ "Output document history based on Git repository info") do |h|
+ opts[:history] = !h.nil?
+ end
+
o.on("-t",
"--template [TEMPLATE]",
"Output template") do |t|
opts[:template] = t
end
@@ -32,18 +38,18 @@
"Output directory (default: same as source file)") do |d|
die('Output directory does not exist!') unless File.exist?(d)
opts[:output] = d
end
- o.on("-h", "--help", "Show help") do |h|
+ o.on("--help", "Show help") do |h|
puts o
exit
end
end.parse!
die("You need to provide path to a Markdown formatted text file!
USAGE: #{$0} [options] [path/to/file]
- Type #{$0} -h for help") if ARGV.empty?
+ Type #{$0} --help for help") if ARGV.empty?
begin
time = Time.now
o = Markout::Output.new( ARGV.first, opts )
puts "\033[0mConverting \033[1m#{ARGV[0]}\033[30;0m to \033[1m#{o.output_path}\033[0m"