termit 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/termit/output_manager.rb +19 -17
- data/lib/termit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e669a7693aa1dfdd0bce70b3db6e0cd37559a111
|
4
|
+
data.tar.gz: c641d51f9cc587bf9ff24f111b6ba22fc6694f7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccec48cb325b1decadae83651d459363bb7bcc7cb5604fef977c3d5df834b5b81622a0e9a118a057e862f4a6eaf4f0b0d2478ed0004fadaa24e2e46cfb3c007e
|
7
|
+
data.tar.gz: 5d0ef9d0d50afc0ab8ccc819ecd83fb4e6468bec9dd2145a3ea1e66276e3708f41d8c065b03b2420c29f0c4a6bfa6fb7665f5b900ce9b3363c838a2d5e47ecdd
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#Termit [![Build Status](https://travis-ci.org/pawurb/termit.png)](https://travis-ci.org/pawurb/termit)
|
1
|
+
#Termit [![Build Status](https://travis-ci.org/pawurb/termit.png)](https://travis-ci.org/pawurb/termit) [![Gem Version](https://badge.fury.io/rb/termit.png)](http://badge.fury.io/rb/termit)
|
2
2
|
|
3
3
|
|
4
4
|
Termit is an easy way to use Google Translate in your terminal. It does not use paid Google Translate API but instead it headlessly browses www.translate.google.com and parses the response.
|
@@ -1,11 +1,12 @@
|
|
1
1
|
#encoding: UTF-8
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
module Termit
|
3
|
+
class OutputManager
|
4
|
+
def display_error_info
|
5
|
+
puts "TERMIT: Wrong data. Example: 'termit en es the cowboy ' => 'el vaquero"
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
def display_help
|
9
|
+
puts <<-EOS
|
9
10
|
=========TERMIT=========
|
10
11
|
USAGE:
|
11
12
|
termit 'source_language' 'target_language' 'text'
|
@@ -16,19 +17,20 @@ termit en fr 'hey cowboy where is your horse?'
|
|
16
17
|
|
17
18
|
Check docs at: github.com/pawurb/termit
|
18
19
|
EOS
|
19
|
-
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
def display_version
|
23
|
+
puts "Termit #{Termit::VERSION}"
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
def display_translation text
|
27
|
+
print "=> "
|
28
|
+
puts text
|
29
|
+
end
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
def display_synonyms synonyms
|
32
|
+
print '=> Synonyms:'
|
33
|
+
puts synonyms
|
34
|
+
end
|
33
35
|
end
|
34
36
|
end
|
data/lib/termit/version.rb
CHANGED