Sha256: 8a861a514870b1fd6db855a631535e507d1e9c3e12fa61eef1fc2d7d2285dc7b
Contents?: true
Size: 973 Bytes
Versions: 1
Compression:
Stored size: 973 Bytes
Contents
require 'string_ext' module Soywiki VERSION = '0.3.4' WIKI_WORD = /\b([a-z][\w_]+\.)?[A-Z][a-z]+[A-Z]\w*\b/ HYPERLINK = %r|\bhttps?://[^ >)\n\]]+| def self.run if %W( -v --version -h --help).include?(ARGV.first) puts "soywiki #{Soywiki::VERSION}" puts "by Daniel Choi dhchoi@gmail.com" puts puts <<END --- Usage: soywiki [wiki file] Run the command in a directory you've made to contain soywiki files. Specifying a wiki file is optional. If you don't specify a file, soywiki will open the most recently modified wiki file. --- END exit elsif ARGV.first == '--html' self.html_export exit else vim = ENV['SOYWIKI_VIM'] || 'vim' vimscript = File.expand_path("../soywiki.vim", __FILE__) vim_command = "#{vim} -S #{vimscript} #{ARGV.first}" exec vim_command end end def self.html_export require 'soywiki/html' Html.export end end if __FILE__ == $0 Soywiki.run end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
soywiki-0.3.4 | lib/soywiki.rb |