yac 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.cn +3 -3
  2. data/README.rdoc +3 -3
  3. data/lib/yac.rb +5 -5
  4. data/yac.gemspec +2 -2
  5. metadata +2 -2
data/README.cn CHANGED
@@ -26,10 +26,10 @@
26
26
  $ yac update private 更新个人仓库
27
27
  $ yac update 全部更新
28
28
  === 帮助
29
- $ yac help
29
+ $ yac help / -h /--help / yac
30
30
  === 打开仓库shell
31
- $ yac shell main 打开主仓库的shell
32
- $ yac shell 打开个人仓库的shell
31
+ $ yac shell / sh main 打开主仓库的shell
32
+ $ yac shell / sh 打开个人仓库的shell
33
33
  === 文档格式
34
34
  使用.ch后缀,在行首加一个=为一级标题,加N个=为N级标题,不同级别标题可以加入不同颜色高亮
35
35
  在行首加入#将忽略该行,使用 '\#'可以得到 '#'的效果
@@ -26,10 +26,10 @@
26
26
  $ yac update private => Update private repository
27
27
  $ yac update => Update All
28
28
  === Help
29
- $ yac help
29
+ $ yac help / yac / -h / --help
30
30
  === Shell
31
- $ yac shell main => Open the main repository's shell
32
- $ yac shell => Open the private repository's shell
31
+ $ yac shell / sh main => Open the main repository's shell
32
+ $ yac shell / sh => Open the private repository's shell
33
33
  === Documents format
34
34
  Use .ch as the suffix ,At the beginning of the row,plus N = for the N-class title
35
35
  Use '#' at the beginning of a row to comment the line,You can use '\#' to get '#'
data/lib/yac.rb CHANGED
@@ -24,8 +24,8 @@ module Yac
24
24
  when "content" then search(args[1,args.size],"content")
25
25
  when "update" then update(args[1,args.size])
26
26
  when /^(add|edit)$/ then edit(args[1,args.size])
27
- when "help" then help
28
- when "shell" then shell(args[1,args.size])
27
+ when /^(help|-h|yac|--help)$/ then help
28
+ when /^(sh|shell)$/ then shell(args[1,args.size])
29
29
  when "rm" then rm(args[1,args.size])
30
30
  when "init" then init
31
31
  else show(args)
@@ -85,9 +85,9 @@ module Yac
85
85
  @level = 0
86
86
  case `file #{file}`
87
87
  when / PDF /
88
- system("#{CONFIG["pdf_command"]||'evince'} #{file}")
89
- when / image /
90
- system("#{CONFIG["pic_command"]||'eog'} #{file}")
88
+ puts "Please Modify ~/.yacrc To Provide A Valid Command To Open PDF Document" unless system("#{CONFIG["pdf_command"]||'evince'} #{file}")
89
+ when /( image )|(\.svg)/
90
+ puts "Please Modify ~/.yacrc To Provide A Valid Command To Open Image Document" unless system("#{CONFIG["pic_command"]||'eog'} #{file}")
91
91
  else
92
92
  File.new(file).each do |x|
93
93
  format_section(x)
@@ -1,6 +1,6 @@
1
1
  GEM = "yac"
2
- VER = "0.1.0"
3
- DATE = %q{2008-10-11}
2
+ VER = "0.1.2"
3
+ DATE = %q{2008-10-18}
4
4
  AUTHOR = "Jinzhu Zhang"
5
5
  EMAIL = "wosmvp@gmail.com"
6
6
  HOMEPAGE = "http://www.zhangjinzhu.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jinzhu Zhang
@@ -9,7 +9,7 @@ autorequire: yac
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-11 00:00:00 +08:00
12
+ date: 2008-10-18 00:00:00 +08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency