vizi_translator 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc ADDED
@@ -0,0 +1,54 @@
1
+ = ViziTranslator
2
+
3
+ == Introduction
4
+
5
+ This gem module provides a classes to support the language translation of text files or text strings.
6
+ The Frengly on-line service requires registration and prvoides access with a username and password.
7
+ The gem module uses the NET::HTTP library to access the Frengly service.
8
+ Find out more about the translation service at www.frengly.com.
9
+
10
+ == Installation
11
+
12
+ Just run:
13
+
14
+ gem install vizi_translator
15
+
16
+ This sample application will read a text file for translation.
17
+
18
+ The sample text file is a index markdown file written in English.
19
+ The English markdown file provides content for Vizitrax's home page.
20
+ The translated file can be used to replace the English content with content for another language.
21
+
22
+ == Usage
23
+
24
+ require 'vizi_translator'
25
+
26
+ # Set username and password. Username must be registered at Frengly
27
+ username = "akivi"
28
+ password = "welcome123"
29
+
30
+ # Set target language for translation
31
+ targetlanguage = "fr"
32
+
33
+ begin
34
+ # Open test file for translation
35
+ @test = File.read(Dir.pwd+'./data/index.md')
36
+
37
+ # Initiate Translator class
38
+ translator = Vizi::Translator.new
39
+ # Get array with available language codes
40
+ @langcodes = translator.getcodes
41
+ # Get hashed list of languages and language codes
42
+ @langlist = translator.getlist
43
+
44
+ # Call method to do the translation
45
+ @testnew = translator.gettext(username, password, @test, targetlanguage)
46
+
47
+ end
48
+
49
+
50
+ == License
51
+
52
+ This code is made available under the MIT license.
53
+
54
+ All users of this code should read and follow the acceptable use policies for the Frengly translation service.
data/Rakefile CHANGED
@@ -4,20 +4,19 @@ require 'rake/rdoctask'
4
4
  require 'rake/testtask'
5
5
 
6
6
  spec = Gem::Specification.new do |s|
7
- s.name = "http-log-parser"
8
- s.version = "0.0.2"
9
- s.author = "Torsten Curdt"
10
- s.email = "tcurdt at vafer.org"
11
- s.homepage = "http://github.com/tcurdt/http-log-parser"
12
- s.description = "HTTP log file parser"
13
- s.summary = "A package for parsing web server logs."
14
-
15
- s.platform = Gem::Platform::RUBY
16
- s.has_rdoc = true
17
- s.extra_rdoc_files = ["README.rdoc"]
18
-
19
- s.require_path = "lib"
20
- s.files = %w(README.rdoc Rakefile) + Dir.glob("lib/**/*")
7
+ s.name = 'vizi_translator'
8
+ s.version = '0.1.0'
9
+ s.summary = "Language translator that provides a wrapper to the Frengly on-line service"
10
+ s.description = "This gem module provides a classes to support the language translation of text files or text strings.
11
+ The Frengly on-line service requires registration and prvoides access with a username and password.
12
+ The gem module uses the NET::HTTP library to access the Frengly service"
13
+ s.files = Dir.glob("**/**/**")
14
+ s.test_files = Dir.glob("test/*_test.rb")
15
+ s.author = "Al Kivi"
16
+ s.homepage = "http://www.vizitrax.com"
17
+ s.email = "al.kivi@vizitrax.com"
18
+ s.has_rdoc = true
19
+ s.required_ruby_version = '>= 1.8.7'
21
20
  end
22
21
 
23
22
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -26,7 +25,7 @@ end
26
25
 
27
26
  Rake::RDocTask.new(:rdoc) do |rdoc|
28
27
  rdoc.rdoc_dir = 'rdoc'
29
- rdoc.title = 'HttpLogParser'
28
+ rdoc.title = 'ViziTranslator'
30
29
  rdoc.options << '--line-numbers' << '--inline-source'
31
30
  rdoc.rdoc_files.include('README')
32
31
  rdoc.rdoc_files.include('lib/**/*.rb')
data/build_gem1.bat CHANGED
File without changes
data/build_gem2.bat CHANGED
File without changes
data/build_gem3.bat CHANGED
File without changes
data/build_gem4.bat CHANGED
File without changes
data/geany_run_script.bat CHANGED
File without changes
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
  module Vizi # :doc:
3
- require 'vizi_translator'
3
+ require 'vizi/vizi_translator'
4
4
  ## load 'c:\ramaze\viziapp\lib\vizi\vizi_translator.rb'
5
5
  end
data/log/system.log CHANGED
@@ -1 +1,58 @@
1
- 
1
+ I, [2012-06-02T22:56:14.084941 #12523] INFO -- : Starting ... >>> Sat Jun 02 22:56:14 -0400 2012
2
+ I, [2012-06-02T22:56:50.601909 #12571] INFO -- : Starting ... >>> Sat Jun 02 22:56:50 -0400 2012
3
+ I, [2012-06-02T22:56:50.602119 #12571] INFO -- : ![Visitor tracking](/images/visitors.jpg)
4
+ # Welcome to our new website
5
+ If you are a returning visit to our site, you will see many changes.
6
+
7
+ The first change you will see is a new layout that is a result of the move to Ramaze language.
8
+
9
+ If you are not familiar with Ramaze, you can find more information at [Ramaze web site](http://ramaze.net).
10
+
11
+ Another change that you will discover is the use of Google docs spreadsheets to store the results of the weekly production analysis.
12
+
13
+ The Google spreadsheets provide more capabilities including visitor mapping and additional pivot analysis.
14
+
15
+ Here is a sample map that is available with the Google tool.
16
+
17
+ ![Sample world map](/images/world_map.jpg)
18
+
19
+ ...
20
+
21
+ I, [2012-06-02T23:09:01.223644 #12737] INFO -- : Starting ... >>> Sat Jun 02 23:09:01 -0400 2012
22
+ I, [2012-06-02T23:09:01.223875 #12737] INFO -- : ![Visitor tracking](/images/visitors.jpg)
23
+ # Welcome to our new website
24
+ If you are a returning visit to our site, you will see many changes.
25
+
26
+ The first change you will see is a new layout that is a result of the move to Ramaze language.
27
+
28
+ If you are not familiar with Ramaze, you can find more information at [Ramaze web site](http://ramaze.net).
29
+
30
+ Another change that you will discover is the use of Google docs spreadsheets to store the results of the weekly production analysis.
31
+
32
+ The Google spreadsheets provide more capabilities including visitor mapping and additional pivot analysis.
33
+
34
+ Here is a sample map that is available with the Google tool.
35
+
36
+ ![Sample world map](/images/world_map.jpg)
37
+
38
+ ...
39
+
40
+ I, [2012-06-02T23:09:08.162443 #12737] INFO -- : ![Visitor tracking](/images/visitors.jpg)
41
+ # L'accueil à notre nouveau site
42
+ Si vous vous êtes un regagnais visitez à notre site, vous voulez voir de nombreux altérais.
43
+
44
+ Premiere changement vous voulez voir c'est une nouveau mise en page que c'est une suite du déménager à Ramaze la langue.
45
+
46
+ Si vous vous êtes pas familier avec Ramaze, tu peux trouver davantage renseignements sur [Ramaze web site](http://ramaze.net).
47
+
48
+ Un autre changement que vous voulez de découvrir faut la utilisez de Google docs spreadsheets à magasin la résultats du chaque semaine production l'analyse.
49
+
50
+ La Google spreadsheets fournir des davantage capacités compris visiteur mapping et d'autres pivot l'analyse.
51
+
52
+ Voici c'est une l'échantillon la carte que faut disponibles avec la Google outil.
53
+
54
+ ![Sample monde map](/images/world_map.jpg)
55
+
56
+ ...
57
+
58
+ I, [2012-06-02T23:09:08.162606 #12737] INFO -- : Ending ... >>> Sat Jun 02 23:09:08 -0400 2012
data/testit.rb CHANGED
@@ -7,8 +7,9 @@
7
7
  #
8
8
  # Author:: Al Kivi <al.kivi@vizitrax.com>
9
9
 
10
- require 'c:\ruby-gems\vizi_translator\lib\vizi_translator'
11
- ## require 'vizi_translator'
10
+ ## require 'c:\ruby-gems\vizi_translator\lib\vizi_translator'
11
+ require 'rubygems'
12
+ require 'vizi_translator'
12
13
 
13
14
  require 'logger'
14
15
  syslog = Logger.new('./log/system.log',shift_age = 'weekly')
@@ -25,7 +26,7 @@ p 'starting'
25
26
 
26
27
  begin
27
28
  # Open test file for translation
28
- @test = File.read(Dir.pwd+'./data/index.md')
29
+ @test = File.read(Dir.pwd+'/data/index.md')
29
30
  p 'input file ...'
30
31
  p @test
31
32
  syslog.info @test
Binary file
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  spec = Gem::Specification.new do |s|
4
4
  s.name = 'vizi_translator'
5
- s.version = '0.1.0'
5
+ s.version = '0.2.0'
6
6
  s.summary = "Language translator that provides a wrapper to the Frengly on-line service"
7
7
  s.description = "This gem module provides a classes to support the language translation of text files or text strings.
8
8
  The Frengly on-line service requires registration and prvoides access with a username and password.
metadata CHANGED
@@ -1,122 +1,144 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: vizi_translator
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease: !!null
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Al Kivi
9
- autorequire: !!null
14
+ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-06-02 00:00:00.000000000 -04:00
13
- default_executable: !!null
17
+
18
+ date: 2012-06-02 00:00:00 -04:00
19
+ default_executable:
14
20
  dependencies: []
15
- description: ! "This gem module provides a classes to support the language translation
16
- of text files or text strings.\n The Frengly on-line service requires registration
17
- and prvoides access with a username and password.\n The gem module uses the NET::HTTP
18
- library to access the Frengly service"
21
+
22
+ description: |-
23
+ This gem module provides a classes to support the language translation of text files or text strings.
24
+ The Frengly on-line service requires registration and prvoides access with a username and password.
25
+ The gem module uses the NET::HTTP library to access the Frengly service
19
26
  email: al.kivi@vizitrax.com
20
27
  executables: []
28
+
21
29
  extensions: []
30
+
22
31
  extra_rdoc_files: []
23
- files:
24
- - build_gem1.bat
25
- - build_gem2.bat
26
- - build_gem3.bat
27
- - build_gem4.bat
28
- - data/index.md
29
- - data/testfile.txt
30
- - doc/created.rid
31
- - doc/docs/Whois_Documentation.doc
32
- - doc/formats/apache-custom-log.pdf
32
+
33
+ files:
34
+ - vizi_translator-0.1.0.gem
35
+ - doc/Visit.html
36
+ - doc/testit_rb.html
37
+ - doc/Rakefile.html
33
38
  - doc/formats/apache.rtf
39
+ - doc/formats/w3c-extended.rtf
40
+ - doc/formats/apache-custom-log.pdf
34
41
  - doc/formats/format-descriptions.xls
35
42
  - doc/formats/w3c-extended.pdf
36
- - doc/formats/w3c-extended.rtf
37
- - doc/images/brick.png
38
- - doc/images/brick_link.png
39
- - doc/images/bug.png
43
+ - doc/Vizi/Visit.html
44
+ - doc/Vizi/VisitList.html
45
+ - doc/Vizi/LogFormat.html
46
+ - doc/Vizi/UnSupportedLanguage.html
47
+ - doc/Vizi/LogParser.html
48
+ - doc/Vizi/Translator.html
40
49
  - doc/images/bullet_black.png
41
- - doc/images/bullet_toggle_minus.png
42
50
  - doc/images/bullet_toggle_plus.png
43
- - doc/images/date.png
44
- - doc/images/find.png
51
+ - doc/images/zoom.png
52
+ - doc/images/bug.png
53
+ - doc/images/wrench_orange.png
54
+ - doc/images/bullet_toggle_minus.png
45
55
  - doc/images/loadingAnimation.gif
46
56
  - doc/images/macFFBgHack.png
47
- - doc/images/package.png
48
- - doc/images/page_green.png
49
- - doc/images/page_white_text.png
50
- - doc/images/page_white_width.png
51
- - doc/images/plugin.png
52
- - doc/images/ruby.png
57
+ - doc/images/date.png
58
+ - doc/images/brick_link.png
53
59
  - doc/images/tag_green.png
60
+ - doc/images/ruby.png
61
+ - doc/images/page_white_width.png
62
+ - doc/images/find.png
54
63
  - doc/images/wrench.png
55
- - doc/images/wrench_orange.png
56
- - doc/images/zoom.png
57
- - doc/index.html
58
- - doc/js/darkfish.js
59
- - doc/js/jquery.js
60
- - doc/js/quicksearch.js
61
- - doc/js/thickbox-compressed.js
62
- - doc/lib/vizi/parser_rb.html
64
+ - doc/images/page_green.png
65
+ - doc/images/package.png
66
+ - doc/images/plugin.png
67
+ - doc/images/brick.png
68
+ - doc/images/page_white_text.png
69
+ - doc/VisitList.html
70
+ - doc/ViziLogParser.html
71
+ - doc/Object.html
72
+ - doc/Vizi.html
73
+ - doc/created.rid
74
+ - doc/lib/vizi_tracker_rb.html
63
75
  - doc/lib/vizi/vizi_tracker_rb.html
64
- - doc/lib/vizi/vizi_translator.html
76
+ - doc/lib/vizi/parser_rb.html
65
77
  - doc/lib/vizi/vizi_translator_rb.html
78
+ - doc/lib/vizi/vizi_translator.html
66
79
  - doc/lib/vizi_log_parser_rb.html
67
- - doc/lib/vizi_tracker_rb.html
68
80
  - doc/lib/vizi_translator_rb.html
69
- - doc/Object.html
81
+ - doc/docs/Whois_Documentation.doc
82
+ - doc/ViziLogFormat.html
83
+ - doc/js/thickbox-compressed.js
84
+ - doc/js/jquery.js
85
+ - doc/js/darkfish.js
86
+ - doc/js/quicksearch.js
70
87
  - doc/ParserTest.html
71
- - doc/Rakefile.html
72
- - doc/rdoc.css
73
- - doc/README_rdoc.html
74
- - doc/test/parser_test_rb.html
88
+ - doc/index.html
75
89
  - doc/test/test_helper_rb.html
76
- - doc/testit_rb.html
77
- - doc/Visit.html
78
- - doc/VisitList.html
79
- - doc/Vizi/LogFormat.html
80
- - doc/Vizi/LogParser.html
81
- - doc/Vizi/Translator.html
82
- - doc/Vizi/UnSupportedLanguage.html
83
- - doc/Vizi/Visit.html
84
- - doc/Vizi/VisitList.html
85
- - doc/Vizi.html
86
- - doc/ViziLogFormat.html
87
- - doc/ViziLogParser.html
90
+ - doc/test/parser_test_rb.html
91
+ - doc/README_rdoc.html
92
+ - doc/rdoc.css
88
93
  - geany_run_script.bat
89
- - lib/vizi/vizi_translator
94
+ - build_gem4.bat
95
+ - data/testfile.txt
96
+ - data/index.md
90
97
  - lib/vizi/vizi_translator.rb
91
98
  - lib/vizi_translator.rb
92
- - log/system.log
99
+ - build_gem1.bat
100
+ - build_gem3.bat
101
+ - README.rdoc
93
102
  - Rakefile
94
- - testit.rb
95
- - vizi_translator-0.1.0.gem
103
+ - log/system.log
96
104
  - vizi_translator.gemspec
105
+ - testit.rb
106
+ - build_gem2.bat
97
107
  has_rdoc: true
98
108
  homepage: http://www.vizitrax.com
99
109
  licenses: []
100
- post_install_message: !!null
110
+
111
+ post_install_message:
101
112
  rdoc_options: []
102
- require_paths:
113
+
114
+ require_paths:
103
115
  - lib
104
- required_ruby_version: !ruby/object:Gem::Requirement
116
+ required_ruby_version: !ruby/object:Gem::Requirement
105
117
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ hash: 57
122
+ segments:
123
+ - 1
124
+ - 8
125
+ - 7
109
126
  version: 1.8.7
110
- required_rubygems_version: !ruby/object:Gem::Requirement
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
128
  none: false
112
- requirements:
113
- - - ! '>='
114
- - !ruby/object:Gem::Version
115
- version: '0'
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ hash: 3
133
+ segments:
134
+ - 0
135
+ version: "0"
116
136
  requirements: []
117
- rubyforge_project: !!null
118
- rubygems_version: 1.5.0
119
- signing_key: !!null
137
+
138
+ rubyforge_project:
139
+ rubygems_version: 1.6.2
140
+ signing_key:
120
141
  specification_version: 3
121
142
  summary: Language translator that provides a wrapper to the Frengly on-line service
122
143
  test_files: []
144
+
@@ -1,11 +0,0 @@
1
- # This gem module provides a classes to find the right Regional Internet Registry
2
- # for a given IP Address. The query method will navigate each major RIR until a
3
- # response is found.
4
- #
5
- # Author:: Al Kivi <al.kivi@vizitrax.com>
6
- # License:: MIT
7
-
8
- module Vizi
9
- # This class includes a set of methods to navigate and query the regional whois servers
10
- class Gowhois
11
-