jim_breen 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 324b4c0e605b8479aabfbb4ef869e9e6564cbdc6
4
- data.tar.gz: 1c0633df5f4e235150a390d197d18c7ce5c7c151
3
+ metadata.gz: 4b42628fadc1af895044f18df9763595714801da
4
+ data.tar.gz: 9a6ef849b86430c5d38ba448f928862ab4e42547
5
5
  SHA512:
6
- metadata.gz: b00f3ceaaf318ff165f18f7e00cb660162928eb9f26e7a8a28e5ae3cde185c74df749c32e734bab9a1d5a486af94afe4aac08ba9e3027cff2bd9ccb13b08a62e
7
- data.tar.gz: 9ee10c6bfd322a4eec1629f7631c550b5c89c641881c4924e751a5a4fc1803ec29b06976f646f2f3c2d9d9f2b79d1fa0ce0cba635825b58bbf02afe7916a859a
6
+ metadata.gz: 1140643b8da5844c6f4ccc0c30f28e5d1b7684875fc429787d841fb1c72cfa91fe541485b8f546f797346e6aa5f68bfecb3a7544f98820d47d2219718663d62b
7
+ data.tar.gz: 5192323c94d14115c26ec2a4214d1026b1e86a9eceaf895409e899a8c56d38edfbb4e97866ce59bf609e4856c80660eff84c516ea891ac9f765a0f3715228e02
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # JimBreen
2
2
 
3
- TODO: Write a gem description
3
+ jim_breen is a gem which find some sentences with some key words from JimBreen's website ( http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi ). Jim Breen is well known as an Adjunct Senior Research Fellow in the Japanese Studies Centre at Monash University and the one who is cultivating and managing a large scale of Japanese/English dictionary's database.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,56 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ You can find some sentences with '楽しい' as below.
22
+
23
+ $ jim_breen 楽しい
24
+
25
+ こーゆーのは、買うのが楽しいのよ。使うか使わないかなんてのは、二の次なんだって。
26
+ This sort of thing, it's buying stuff that's fun. Whether you use it or not is secondary.
27
+
28
+ 旅行中楽しい思いをした。
29
+ I had a good time during the trip.
30
+
31
+ 旅行ほど楽しいものはない。
32
+ Nothing is more pleasant than traveling.
33
+
34
+ You can find some sentences with 'as well as' as below.
35
+
36
+ $ jim_breen "as well as"
37
+
38
+ 肩関節は、単独で動くほか、腕の動きにも連動して動きます。
39
+ The shoulder joints, as well as moving on their own, also move in conjunction with arm movements.
40
+
41
+ 今日は、ばーさんのお使いを兼ねて街で買い物。
42
+ Today I'm shopping in town as well as running an errand for my grandmother.
43
+
44
+ 両親同様に少女も大変思いやりがあった。
45
+ The girl as well as her parents was very sympahtetic.
46
+
47
+ 目が覚めているときばかりか眠っているときにもそれが必要だ。
48
+ We need it when asleep as well as when awake.
49
+
50
+ You can find more sentences with number(upto 1000) as below.
51
+
52
+ $ jim_breen "look into" 100
53
+
54
+ できるだけ君本人が行って調べたほうがいいよ。
55
+ If at all possible, you should go and look into the matter yourself.
56
+
57
+ 彼らはその問題の調査をはじめた。
58
+ They began to look into the problem.
59
+
60
+ 彼らはその事故の原因を調べることに意見が一致した。
61
+ They agreed to look into the causes of the accident.
62
+
63
+ 彼はその一件を調査し始めた。
64
+ He began to look into the matter.
65
+
66
+ 箱の中をみてごらん。
67
+ Look into the box.
68
+
69
+ ....
70
+ ....
22
71
 
23
72
  ## Contributing
24
73
 
data/jim_breen.gemspec CHANGED
@@ -22,4 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake"
23
23
 
24
24
  spec.add_dependency "nokogiri"
25
+ spec.add_dependency "formatador"
25
26
  end
data/lib/jim_breen/cli.rb CHANGED
@@ -11,7 +11,12 @@ module JimBreen
11
11
  text = args[0]
12
12
  number = args[1] == nil ? 10 : args[1].to_i
13
13
 
14
- puts find(text, number)
14
+ require 'formatador'
15
+ result = find(text, number)
16
+ result.gsub!(Regexp.new(text, Regexp::IGNORECASE)) do |matched|
17
+ '[green]' + matched + '[/]'
18
+ end
19
+ Formatador.display_line(result)
15
20
  end
16
21
 
17
22
  def self.find(text, number)
@@ -1,3 +1,3 @@
1
1
  module JimBreen
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jim_breen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsushi Ishida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-09 00:00:00.000000000 Z
11
+ date: 2014-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: formatador
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: This gem allows you to search the WWWJDIC Examples file for examples
56
70
  which contain selected words in Japanese and/or English.
57
71
  email: