mirror of
https://github.com/ToshioCP/Gtk4-tutorial.git
synced 2025-01-18 10:26:39 +01:00
24 lines
453 B
Ruby
24 lines
453 B
Ruby
#!/bin/sh
|
|
exec ruby -x "$0" "$@"
|
|
#!ruby
|
|
|
|
# src2md.rb
|
|
|
|
require_relative 'lib/lib_src2md.rb'
|
|
|
|
def usage
|
|
$stderr.print "Usage: ruby srcd2md.rb src.md_file md_file width\n"
|
|
$stderr.print " The width is used to fold lines in indented or fenced code blocks.\n"
|
|
$stderr.print " If the width is negative, no lines are folded.\n"
|
|
end
|
|
|
|
if ARGV.size != 3
|
|
usage
|
|
exit 1
|
|
end
|
|
|
|
srcmd = ARGV[0]
|
|
md = ARGV[1]
|
|
width = ARGV[2]
|
|
src2md srcmd, md, width.to_i
|
|
|