iciba 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -23,8 +23,8 @@ Command-line usage:
23
23
  $ fy 'words to be translated'
24
24
  $ fy 'english' # for single word answers
25
25
  $ fy 'english' -e #for complete definition if available
26
+ $ fy 'You will need to have root access to do this.' -p #to get pinyin for chinese characters, (hopefully fy.iciba.com is correct)
26
27
  $ fy http://www.chinadaily.com.cn/business/2012-09/07/content_15742188.htm -l #to download links
27
- $ fy http://www.chinadaily.com.cn/business/2012-09/07/content_15742188.htm -l -r #to translate the links TODO
28
28
 
29
29
  Ruby usage:
30
30
 
@@ -16,7 +16,8 @@ module Iciba
16
16
  puts '------------------------------------------------------------------------------------' if bin
17
17
  download_and_parse(words, dir, extended)
18
18
  puts wrap_text(self.result) if bin
19
- puts self.result.to_pinyin if self.result.contains_cjk? && bin
19
+ puts if self.result.contains_cjk? && bin
20
+ puts wrap_text(self.result.strip.gsub("\r\n", '|newline|').to_pinyin.gsub('|newline|', "\r\n\r\n"), 40) if self.result.contains_cjk? && bin
20
21
  puts '------------------------------------------------------------------------------------' if bin
21
22
  return self.result
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module Iciba
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iciba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: