linggle 0.01.3 → 0.02

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cf66f7cf20fbe1348d39635e76a5d8f1b8fb681
4
- data.tar.gz: 73d742c52942207b65bed90557a1d6aae22e54ca
3
+ metadata.gz: 0e9751c84373bda3940f935253f35168486ad3fa
4
+ data.tar.gz: e8dfe438656c9ca2d01214d32e4733e477f64d72
5
5
  SHA512:
6
- metadata.gz: bbda937d38181393943549cf9971a7e183d1f1b7c4673c1aa8506600372d6d1f6c2ec34b2b350607315bae4d65d47a1725b78e92fe97ba52f6028aa61d3a0a01
7
- data.tar.gz: d66ebcddfd0ff0e221eacab1aff9540447d6018bd1cb1a69b779eb5b90a8626a45665ade712460f588087124ac96f247c017f13d45e7b858bc13ed33bc9b39ab
6
+ metadata.gz: 8ad77dada3896b0df3b0df82a9f30f3a4a8897729c9ca862f7bb8581c23e2f3de6c54552e342a3577287b0394b1cc3215040cbb194494be3b9202c988a443e20
7
+ data.tar.gz: 15102762aae36927e4b55b6c888e8236ba46e409d8d806f9af1ee44441b3b49e2c01f4cdb5f1fde76c4a6f8ba66119087a86c8de833711a232aaa35e91e3a50b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- linggle (0.01.1)
4
+ linggle (0.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://gems.ruby-china.org/
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Linggle
2
2
  A Linggle(http://linggle.com/) in cli
3
3
 
4
- ![linggle cli](https://raw.githubusercontent.com/ffx/linggle-cli/master/assets/short.png)
4
+ ![linggle cli](https://raw.githubusercontent.com/fffx/linggle-cli/master/assets/short.png)
5
5
 
6
6
  ## Installation
7
7
 
@@ -24,8 +24,10 @@ Or install it yourself as:
24
24
  - 查询任意一至多个词
25
25
  只要在你想要插入字词的位置使用* (星号)来查询一个词,或是_ (底线)来查询零至多个词就可以了。
26
26
 
27
+ ```
27
28
  present a method _
28
29
  listen _ music
30
+ ```
29
31
 
30
32
 
31
33
 
@@ -34,30 +36,35 @@ listen _ music
34
36
  回头检查时,总是觉得哪里怪怪的,他很怀疑“discuss”后面到底需不需要
35
37
  加“about” ⋯⋯这时只要使用Linggle,在你不确定的字前加上? (问号),Linggle就会告诉你需不需要这个字啰!
36
38
 
39
+ ```
37
40
  discuss ?about the issue
41
+ ```
38
42
 
39
43
  - 使用斜线号查询如何替换某字词
40
44
  介系词这么多常常搞不清楚要用哪一个吗?太多字可以用却不知道哪一个比较适合吗?
41
45
  让Linggle来告诉你该怎么选吧!很简单,只需要在你要抉择的两个字中间加入/ (斜线号)
42
46
  就可以了!不只是介系词,其他词性也可以!
43
47
 
48
+ ```
44
49
  in/at the afternoon
45
50
  play _ important role/part
46
- Guide
51
+ ```
47
52
 
48
53
  - 使用任意词性查询搭配词
49
54
  Linggle最大的特色,就是可以使用「关键词」配合「特定词性」来查询各种搭配词。比如说,
50
55
  可以用v. death penalty来查询“death penalty”搭配的动词,效果不逊于一般搭配词典喔!
51
-
56
+ ```
52
57
  v. death penalty
53
58
  acquire n.
59
+ ```
54
60
 
55
61
 
56
62
  - 精准的搭配词查询
57
63
  想要更加精准的查询搭配词,我们就会建议使用复杂的查询式,例如在想要查询的动词前
58
64
  加上一个“to”,让Linggle 不至于会错意。
59
-
65
+ ```
60
66
  to v. ?prep. ?det. difficulty/difficulties
67
+ ```
61
68
 
62
69
 
63
70
  ## Development
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+ require "bundler/setup"
3
+ require "linggle"
4
+
5
+ # You can add fixtures and/or initialization code here to make experimenting
6
+ # with your gem easier. You can also use a different console, if you like.
7
+
8
+ # (If you use this, don't forget to add pry to your Gemfile!)
9
+ # require "pry"
10
+ # Pry.start
11
+
12
+ require "irb"
13
+ IRB.start(__FILE__)
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: UTF-8
3
- $: << File.expand_path("../../lib/", __FILE__)
4
3
  require "bundler/setup"
5
4
  require "linggle"
6
5
  Linggle.execute
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -1,5 +1,5 @@
1
- module Linggle
2
- def self.percents_str
3
-
4
- end
5
- end
1
+ module Linggle
2
+ def self.percents_str
3
+
4
+ end
5
+ end
@@ -1,40 +1,40 @@
1
- ## copy from:
2
- # https://stackoverflow.com/a/16363159/5615038
3
- # only works on unix
4
-
5
- class String
6
- def black; "\e[30m#{self}\e[0m" end
7
- def red; "\e[31m#{self}\e[0m" end
8
- def green; "\e[32m#{self}\e[0m" end
9
- def brown; "\e[33m#{self}\e[0m" end
10
- def blue; "\e[34m#{self}\e[0m" end
11
- def magenta; "\e[35m#{self}\e[0m" end
12
- def cyan; "\e[36m#{self}\e[0m" end
13
- def gray; "\e[37m#{self}\e[0m" end
14
-
15
- def bg_black; "\e[40m#{self}\e[0m" end
16
- def bg_red; "\e[41m#{self}\e[0m" end
17
- def bg_green; "\e[42m#{self}\e[0m" end
18
- def bg_brown; "\e[43m#{self}\e[0m" end
19
- def bg_blue; "\e[44m#{self}\e[0m" end
20
- def bg_magenta; "\e[45m#{self}\e[0m" end
21
- def bg_cyan; "\e[46m#{self}\e[0m" end
22
- def bg_gray; "\e[47m#{self}\e[0m" end
23
-
24
- def bold; "\e[1m#{self}\e[22m" end
25
- def italic; "\e[3m#{self}\e[23m" end
26
- def underline; "\e[4m#{self}\e[24m" end
27
- def blink; "\e[5m#{self}\e[25m" end
28
- def reverse_color; "\e[7m#{self}\e[27m" end
29
-
30
- # [:bold, :italic, :blink].each do |name|
31
- # define_method(:"#{name}) do ||
32
- # end
33
-
34
- # 55.6%
35
- Strips = '|' * 100
36
- def percent_line
37
- count = (self[/\d+\.?\d+/].to_f).round
38
- "[#{ Strips[0..count].red } #{ ' ' * (100 - count) }]"
39
- end
40
- end
1
+ ## copy from:
2
+ # https://stackoverflow.com/a/16363159/5615038
3
+ # only works on unix
4
+
5
+ class String
6
+ def black; "\e[30m#{self}\e[0m" end
7
+ def red; "\e[31m#{self}\e[0m" end
8
+ def green; "\e[32m#{self}\e[0m" end
9
+ def brown; "\e[33m#{self}\e[0m" end
10
+ def blue; "\e[34m#{self}\e[0m" end
11
+ def magenta; "\e[35m#{self}\e[0m" end
12
+ def cyan; "\e[36m#{self}\e[0m" end
13
+ def gray; "\e[37m#{self}\e[0m" end
14
+
15
+ def bg_black; "\e[40m#{self}\e[0m" end
16
+ def bg_red; "\e[41m#{self}\e[0m" end
17
+ def bg_green; "\e[42m#{self}\e[0m" end
18
+ def bg_brown; "\e[43m#{self}\e[0m" end
19
+ def bg_blue; "\e[44m#{self}\e[0m" end
20
+ def bg_magenta; "\e[45m#{self}\e[0m" end
21
+ def bg_cyan; "\e[46m#{self}\e[0m" end
22
+ def bg_gray; "\e[47m#{self}\e[0m" end
23
+
24
+ def bold; "\e[1m#{self}\e[22m" end
25
+ def italic; "\e[3m#{self}\e[23m" end
26
+ def underline; "\e[4m#{self}\e[24m" end
27
+ def blink; "\e[5m#{self}\e[25m" end
28
+ def reverse_color; "\e[7m#{self}\e[27m" end
29
+
30
+ # [:bold, :italic, :blink].each do |name|
31
+ # define_method(:"#{name}) do ||
32
+ # end
33
+
34
+ # 55.6%
35
+ Strips = '|' * 100
36
+ def percent_line
37
+ count = (self[/\d+\.?\d+/].to_f).round
38
+ "[#{ Strips[0..count].red } #{ ' ' * (100 - count) }]"
39
+ end
40
+ end
@@ -1,3 +1,3 @@
1
1
  module Linggle
2
- VERSION = "0.01.3"
2
+ VERSION = "0.02"
3
3
  end
@@ -27,12 +27,12 @@ Gem::Specification.new do |spec|
27
27
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
28
28
  f.match(%r{^(test|spec|features)/})
29
29
  end
30
- spec.bindir = "bin"
31
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
30
+ spec.bindir = "exe"
31
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ["lib"]
33
33
 
34
34
  spec.add_development_dependency "bundler", "~> 1.16.a"
35
35
  spec.add_development_dependency "rake", "~> 10.0"
36
36
  spec.add_development_dependency "rspec", "~> 3.0"
37
- spec.add_development_dependency "colorize", "~> 0.8.0"
37
+ spec.add_dependency "colorize", "~> 0.8.0"
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linggle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.01.3
4
+ version: '0.02'
5
5
  platform: ruby
6
6
  authors:
7
7
  - fangxing
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-19 00:00:00.000000000 Z
11
+ date: 2018-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -59,7 +59,7 @@ dependencies:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.8.0
62
- type: :development
62
+ type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
@@ -69,8 +69,7 @@ dependencies:
69
69
  description: use linggle in your command line
70
70
  email:
71
71
  - fangxing204@gmail.com
72
- executables:
73
- - linggle
72
+ executables: []
74
73
  extensions: []
75
74
  extra_rdoc_files: []
76
75
  files:
@@ -83,7 +82,9 @@ files:
83
82
  - README.md
84
83
  - Rakefile
85
84
  - assets/short.png
85
+ - bin/console
86
86
  - bin/linggle
87
+ - bin/setup
87
88
  - lib/linggle.rb
88
89
  - lib/linggle/api.rb
89
90
  - lib/linggle/prints.rb
@@ -111,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
112
  version: '0'
112
113
  requirements: []
113
114
  rubyforge_project:
114
- rubygems_version: 2.6.14
115
+ rubygems_version: 2.6.11
115
116
  signing_key:
116
117
  specification_version: 4
117
118
  summary: http://linggle.com/ in cli