langouste 0.1.0 → 0.1.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.
- data/README.rdoc +31 -2
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/bin/{translate → langouste} +0 -0
- data/config/langouste.yaml +26 -27
- data/langouste.gemspec +5 -5
- metadata +6 -6
data/README.rdoc
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
|
-
=
|
|
1
|
+
= Langouste
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Gem and console tool for translation through various online services (google translate, babelfish, pereklad, etc).
|
|
4
|
+
|
|
5
|
+
With the configuration yaml-file can be configured to work with another service (look at langouste.yaml).
|
|
6
|
+
|
|
7
|
+
Full list of service defined in config:
|
|
8
|
+
langouste --list
|
|
9
|
+
|
|
10
|
+
== Using
|
|
11
|
+
|
|
12
|
+
gem install langouste
|
|
13
|
+
|
|
14
|
+
=== From console:
|
|
15
|
+
|
|
16
|
+
langouste -f russian -t english -s google "Я список кораблей прочел до середины"
|
|
17
|
+
> "I read the list of ships until the middle"
|
|
18
|
+
|
|
19
|
+
Or shorter:
|
|
20
|
+
langouste -f ru -t en Я список кораблей прочел до середины
|
|
21
|
+
|
|
22
|
+
Or even so:
|
|
23
|
+
langouste -f e -t r Я список кораблей прочел до середины
|
|
24
|
+
|
|
25
|
+
More help:
|
|
26
|
+
langouste --help
|
|
27
|
+
|
|
28
|
+
=== Inside scripts
|
|
29
|
+
|
|
30
|
+
require 'langouste'
|
|
31
|
+
t = Langouste.new(:from_lang => :russian, :to_lang => :english, :service => :google)
|
|
32
|
+
puts t.translate("Я список кораблей прочел до середины")
|
|
4
33
|
|
|
5
34
|
== Note on Patches/Pull Requests
|
|
6
35
|
|
data/Rakefile
CHANGED
|
@@ -5,10 +5,10 @@ begin
|
|
|
5
5
|
require 'jeweler'
|
|
6
6
|
Jeweler::Tasks.new do |gem|
|
|
7
7
|
gem.name = "langouste"
|
|
8
|
-
gem.summary = %Q{
|
|
8
|
+
gem.summary = %Q{Gem and console tool for translation through various online services (google translate, babelfish, pereklad, etc)}
|
|
9
9
|
gem.email = "hmizgir@gmail.com"
|
|
10
10
|
gem.homepage = "http://github.com/hariton/langouste"
|
|
11
|
-
gem.executables = %w(
|
|
11
|
+
gem.executables = %w(langouste)
|
|
12
12
|
gem.authors = ["Hariton Mizgir"]
|
|
13
13
|
gem.add_dependency "mechanize", ">= 1.0.0"
|
|
14
14
|
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.2
|
data/bin/{translate → langouste}
RENAMED
|
File without changes
|
data/config/langouste.yaml
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
:es: :spanish
|
|
10
|
-
:de: :german
|
|
11
|
-
:fr: :french
|
|
12
|
-
:it: :italian
|
|
13
|
-
services:
|
|
14
|
-
:g: :google
|
|
15
|
-
:m: :meta
|
|
16
|
-
:b: :babelfish
|
|
17
|
-
:p: :pereklad
|
|
18
|
-
:t: :prompt
|
|
1
|
+
pereklad_languages: &pereklad_languages
|
|
2
|
+
:russian: Rus
|
|
3
|
+
:english: Eng
|
|
4
|
+
:spanish: es
|
|
5
|
+
:ukrainian: Ukr
|
|
6
|
+
:german: Ger
|
|
7
|
+
:french: Fre
|
|
8
|
+
:italian: it
|
|
19
9
|
|
|
20
10
|
# полный список: af, sq, ar, be, bg, ca, zh-CN, zh-TW, hr, cs, da, nl, en, et, tl, fi, fr, gl, de, el, ht, iw, hi, hu, is, id, ga, it, ja, ko, lv, lt, mk, ms, mt, no, fa, pl, pt, ro, ru, sr, sk, sl, es, sw, sv, th, tr, uk, vi, cy, yi
|
|
21
11
|
google_languages: &google_languages
|
|
@@ -27,15 +17,6 @@ google_languages: &google_languages
|
|
|
27
17
|
:french: fr
|
|
28
18
|
:italian: it
|
|
29
19
|
|
|
30
|
-
pereklad_languages: &pereklad_languages
|
|
31
|
-
:russian: Rus
|
|
32
|
-
:english: Eng
|
|
33
|
-
:spanish: es
|
|
34
|
-
:ukrainian: Ukr
|
|
35
|
-
:german: Ger
|
|
36
|
-
:french: Fre
|
|
37
|
-
:italian: it
|
|
38
|
-
|
|
39
20
|
:google:
|
|
40
21
|
url: 'http://translate.google.com'
|
|
41
22
|
input:
|
|
@@ -184,3 +165,21 @@ pereklad_languages: &pereklad_languages
|
|
|
184
165
|
text:
|
|
185
166
|
selector: {:name: 'result'}
|
|
186
167
|
|
|
168
|
+
abbreviations:
|
|
169
|
+
languages:
|
|
170
|
+
:ru: :russian
|
|
171
|
+
:r: :russian
|
|
172
|
+
:en: :english
|
|
173
|
+
:e: :english
|
|
174
|
+
:ua: :ukrainian
|
|
175
|
+
:u: :ukrainian
|
|
176
|
+
:es: :spanish
|
|
177
|
+
:de: :german
|
|
178
|
+
:fr: :french
|
|
179
|
+
:it: :italian
|
|
180
|
+
services:
|
|
181
|
+
:g: :google
|
|
182
|
+
:m: :meta
|
|
183
|
+
:b: :babelfish
|
|
184
|
+
:p: :pereklad
|
|
185
|
+
:t: :prompt
|
data/langouste.gemspec
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{langouste}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.2"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Hariton Mizgir"]
|
|
12
12
|
s.date = %q{2010-05-05}
|
|
13
|
-
s.default_executable = %q{
|
|
13
|
+
s.default_executable = %q{langouste}
|
|
14
14
|
s.email = %q{hmizgir@gmail.com}
|
|
15
|
-
s.executables = ["
|
|
15
|
+
s.executables = ["langouste"]
|
|
16
16
|
s.extra_rdoc_files = [
|
|
17
17
|
"LICENSE",
|
|
18
18
|
"README.rdoc"
|
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
|
24
24
|
"README.rdoc",
|
|
25
25
|
"Rakefile",
|
|
26
26
|
"VERSION",
|
|
27
|
-
"bin/
|
|
27
|
+
"bin/langouste",
|
|
28
28
|
"config/langouste.yaml",
|
|
29
29
|
"langouste.gemspec",
|
|
30
30
|
"lib/langouste.rb",
|
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
|
|
|
35
35
|
s.rdoc_options = ["--charset=UTF-8"]
|
|
36
36
|
s.require_paths = ["lib"]
|
|
37
37
|
s.rubygems_version = %q{1.3.6}
|
|
38
|
-
s.summary = %q{
|
|
38
|
+
s.summary = %q{Gem and console tool for translation through various online services (google translate, babelfish, pereklad, etc)}
|
|
39
39
|
s.test_files = [
|
|
40
40
|
"test/test_langouste.rb",
|
|
41
41
|
"test/helper.rb"
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
9
|
-
version: 0.1.
|
|
8
|
+
- 2
|
|
9
|
+
version: 0.1.2
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Hariton Mizgir
|
|
@@ -15,7 +15,7 @@ bindir: bin
|
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
17
|
date: 2010-05-05 00:00:00 +04:00
|
|
18
|
-
default_executable:
|
|
18
|
+
default_executable: langouste
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
name: mechanize
|
|
@@ -46,7 +46,7 @@ dependencies:
|
|
|
46
46
|
description:
|
|
47
47
|
email: hmizgir@gmail.com
|
|
48
48
|
executables:
|
|
49
|
-
-
|
|
49
|
+
- langouste
|
|
50
50
|
extensions: []
|
|
51
51
|
|
|
52
52
|
extra_rdoc_files:
|
|
@@ -59,7 +59,7 @@ files:
|
|
|
59
59
|
- README.rdoc
|
|
60
60
|
- Rakefile
|
|
61
61
|
- VERSION
|
|
62
|
-
- bin/
|
|
62
|
+
- bin/langouste
|
|
63
63
|
- config/langouste.yaml
|
|
64
64
|
- langouste.gemspec
|
|
65
65
|
- lib/langouste.rb
|
|
@@ -94,7 +94,7 @@ rubyforge_project:
|
|
|
94
94
|
rubygems_version: 1.3.6
|
|
95
95
|
signing_key:
|
|
96
96
|
specification_version: 3
|
|
97
|
-
summary:
|
|
97
|
+
summary: Gem and console tool for translation through various online services (google translate, babelfish, pereklad, etc)
|
|
98
98
|
test_files:
|
|
99
99
|
- test/test_langouste.rb
|
|
100
100
|
- test/helper.rb
|