termit 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/termit/output_manager.rb +17 -14
- 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: d4becac03cd5e109044a37c71df52b8e39d4a4d9
|
4
|
+
data.tar.gz: 4b95288ab909020a7b9c7ff7eee0c532a559b9b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8c5561b329efce00848eb9297023509f2c0a6b5cb7941ac0a68fcfaae3c3ae6a9235c176e330c94ec55f2020a00a0a163fc2b93d525a26feaf4a1de754a95b2
|
7
|
+
data.tar.gz: afef69c8a1675e489bf84c56ccb705e4796a566da8c56bc702024430cd759fd13286d41090a1af820826fe54b50ce1ac29c48c087677c10ae5fa654352fbfeae
|
@@ -2,11 +2,23 @@
|
|
2
2
|
module Termit
|
3
3
|
class OutputManager
|
4
4
|
def display_error_info_and_quit
|
5
|
-
|
5
|
+
puts "TERMIT: Wrong data. Example: 'termit en es the cowboy ' => 'el vaquero'"
|
6
|
+
exit
|
7
|
+
end
|
8
|
+
|
9
|
+
def display_player_error_and_quit
|
10
|
+
message = "Termit speech synthesis requires mpg123 installed."
|
11
|
+
case Gem::Platform.local.os
|
12
|
+
when "darwin"
|
13
|
+
message << "\nPlease run 'brew install mpg123'"
|
14
|
+
when "linux"
|
15
|
+
message << "\nPlease run 'sudo apt-get install mpg123'"
|
16
|
+
end
|
17
|
+
abort message
|
6
18
|
end
|
7
19
|
|
8
20
|
def display_help_and_quit
|
9
|
-
|
21
|
+
puts <<-EOS
|
10
22
|
=========TERMIT=========
|
11
23
|
Usage:
|
12
24
|
termit 'source_language' 'target_language' 'text'
|
@@ -21,21 +33,13 @@ Options:
|
|
21
33
|
|
22
34
|
Check docs at: github.com/pawurb/termit
|
23
35
|
EOS
|
36
|
+
exit
|
24
37
|
end
|
25
38
|
|
26
|
-
def display_player_error_and_quit
|
27
|
-
message = "Termit speech synthesis requires mpg123 installed."
|
28
|
-
case Gem::Platform.local.os
|
29
|
-
when "darwin"
|
30
|
-
message << "\nPlease run 'brew install mpg123'"
|
31
|
-
when "linux"
|
32
|
-
message << "\nPlease run 'sudo apt-get install mpg123'"
|
33
|
-
end
|
34
|
-
abort message
|
35
|
-
end
|
36
39
|
|
37
40
|
def display_version_and_quit
|
38
|
-
|
41
|
+
puts "Termit #{Termit::VERSION}"
|
42
|
+
exit
|
39
43
|
end
|
40
44
|
|
41
45
|
def display_translation text
|
@@ -47,6 +51,5 @@ EOS
|
|
47
51
|
print '=> Synonyms: '
|
48
52
|
puts synonyms
|
49
53
|
end
|
50
|
-
|
51
54
|
end
|
52
55
|
end
|
data/lib/termit/version.rb
CHANGED