class Latex2hiki::Command

Your code goes here…

Public Class Methods

new(argv=[]) click to toggle source
# File lib/latex2hiki.rb, line 13
def initialize(argv=[])
  @argv = argv
  @pre=@head=@post=nil
  @listings=false
end
run(argv=[]) click to toggle source
# File lib/latex2hiki.rb, line 9
def self.run(argv=[])
  new(argv).execute
end

Public Instance Methods

execute() click to toggle source
# File lib/latex2hiki.rb, line 19
def execute
  @argv << '--help' if @argv.size==0
  command_parser = OptionParser.new do |opt|
    opt.on('-v', '--version','show program Version.') { |v|
      opt.version = Latex2hiki::VERSION
      puts opt.ver
      exit
    }
  end
  command_parser.parse!(@argv)
  puts NKF.nkf("-w",Latex.new(File.read(ARGV[0])).to_hiki)
  exit
end