vizi_translator 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/Rakefile +44 -0
  2. data/build_gem1.bat +1 -0
  3. data/build_gem2.bat +1 -0
  4. data/build_gem3.bat +1 -0
  5. data/build_gem4.bat +1 -0
  6. data/data/index.md +17 -0
  7. data/data/testfile.txt +4 -0
  8. data/doc/Object.html +200 -0
  9. data/doc/ParserTest.html +268 -0
  10. data/doc/README_rdoc.html +128 -0
  11. data/doc/Rakefile.html +148 -0
  12. data/doc/Visit.html +487 -0
  13. data/doc/VisitList.html +385 -0
  14. data/doc/Vizi/LogFormat.html +377 -0
  15. data/doc/Vizi/LogParser.html +551 -0
  16. data/doc/Vizi/Translator.html +302 -0
  17. data/doc/Vizi/UnSupportedLanguage.html +212 -0
  18. data/doc/Vizi/Visit.html +487 -0
  19. data/doc/Vizi/VisitList.html +386 -0
  20. data/doc/Vizi.html +159 -0
  21. data/doc/ViziLogFormat.html +382 -0
  22. data/doc/ViziLogParser.html +551 -0
  23. data/doc/created.rid +4 -0
  24. data/doc/docs/Whois_Documentation.doc +0 -0
  25. data/doc/formats/apache-custom-log.pdf +0 -0
  26. data/doc/formats/apache.rtf +238 -0
  27. data/doc/formats/format-descriptions.xls +0 -0
  28. data/doc/formats/w3c-extended.pdf +0 -0
  29. data/doc/formats/w3c-extended.rtf +135 -0
  30. data/doc/images/brick.png +0 -0
  31. data/doc/images/brick_link.png +0 -0
  32. data/doc/images/bug.png +0 -0
  33. data/doc/images/bullet_black.png +0 -0
  34. data/doc/images/bullet_toggle_minus.png +0 -0
  35. data/doc/images/bullet_toggle_plus.png +0 -0
  36. data/doc/images/date.png +0 -0
  37. data/doc/images/find.png +0 -0
  38. data/doc/images/loadingAnimation.gif +0 -0
  39. data/doc/images/macFFBgHack.png +0 -0
  40. data/doc/images/package.png +0 -0
  41. data/doc/images/page_green.png +0 -0
  42. data/doc/images/page_white_text.png +0 -0
  43. data/doc/images/page_white_width.png +0 -0
  44. data/doc/images/plugin.png +0 -0
  45. data/doc/images/ruby.png +0 -0
  46. data/doc/images/tag_green.png +0 -0
  47. data/doc/images/wrench.png +0 -0
  48. data/doc/images/wrench_orange.png +0 -0
  49. data/doc/images/zoom.png +0 -0
  50. data/doc/index.html +68 -0
  51. data/doc/js/darkfish.js +116 -0
  52. data/doc/js/jquery.js +32 -0
  53. data/doc/js/quicksearch.js +114 -0
  54. data/doc/js/thickbox-compressed.js +10 -0
  55. data/doc/lib/vizi/parser_rb.html +63 -0
  56. data/doc/lib/vizi/vizi_tracker_rb.html +63 -0
  57. data/doc/lib/vizi/vizi_translator.html +104 -0
  58. data/doc/lib/vizi/vizi_translator_rb.html +69 -0
  59. data/doc/lib/vizi_log_parser_rb.html +56 -0
  60. data/doc/lib/vizi_tracker_rb.html +56 -0
  61. data/doc/lib/vizi_translator_rb.html +54 -0
  62. data/doc/rdoc.css +759 -0
  63. data/doc/test/parser_test_rb.html +54 -0
  64. data/doc/test/test_helper_rb.html +56 -0
  65. data/doc/testit_rb.html +63 -0
  66. data/geany_run_script.bat +6 -0
  67. data/lib/vizi/vizi_translator +11 -0
  68. data/lib/vizi/vizi_translator.rb +68 -0
  69. data/lib/vizi_translator.rb +5 -0
  70. data/log/system.log +1 -0
  71. data/testit.rb +51 -0
  72. data/vizi_translator.gemspec +17 -0
  73. metadata +122 -0
@@ -0,0 +1,128 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=IBM437" http-equiv="Content-Type" />
8
+
9
+ <title>File: README.rdoc [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="./js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="./js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="./js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file">
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="project-metadata">
36
+
37
+
38
+ <div id="fileindex-section" class="section project-section">
39
+ <h3 class="section-header">Files</h3>
40
+ <ul>
41
+
42
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
43
+
44
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
45
+
46
+ </ul>
47
+ </div>
48
+
49
+
50
+ <div id="classindex-section" class="section project-section">
51
+ <h3 class="section-header">Class Index
52
+ <span class="search-toggle"><img src="./images/find.png"
53
+ height="16" width="16" alt="[+]"
54
+ title="show/hide quicksearch" /></span></h3>
55
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
56
+ <fieldset>
57
+ <legend>Quicksearch</legend>
58
+ <input type="text" name="quicksearch" value=""
59
+ class="quicksearch-field" />
60
+ </fieldset>
61
+ </form>
62
+
63
+ <ul class="link-list">
64
+
65
+ <li><a href="./Vizi.html">Vizi</a></li>
66
+
67
+ <li><a href="./Vizi/LogFormat.html">Vizi::LogFormat</a></li>
68
+
69
+ <li><a href="./Vizi/LogParser.html">Vizi::LogParser</a></li>
70
+
71
+ <li><a href="./Vizi/Visit.html">Vizi::Visit</a></li>
72
+
73
+ <li><a href="./Vizi/VisitList.html">Vizi::VisitList</a></li>
74
+
75
+ <li><a href="./Object.html">Object</a></li>
76
+
77
+ <li><a href="./ParserTest.html">ParserTest</a></li>
78
+
79
+ </ul>
80
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
81
+ </div>
82
+
83
+
84
+ </div>
85
+ </div>
86
+
87
+ <div id="documentation">
88
+
89
+ <h1>LogParser</h1>
90
+
91
+ <h2>Introduction</h2>
92
+
93
+ <p>This gem provides an easy to use parser to various HTTP log formats.</p>
94
+
95
+ <h2>Installation</h2>
96
+
97
+ <p>Just run:</p>
98
+
99
+ <pre>gem install http-log-parser</pre>
100
+
101
+ <p>That should take care of it.</p>
102
+
103
+ <h2>Usage</h2>
104
+
105
+ <pre>require 'http_log_parser'
106
+ parser = HttpLogParser.new
107
+ File.open('/path/to.log', 'r') do |file|
108
+ while(line = file.gets)
109
+ parsed_data = parser.parse_line(line)
110
+ p parsed_data
111
+ end
112
+ end</pre>
113
+
114
+ <h2>License</h2>
115
+
116
+ <p>This code is made availablie under the MIT license. It is based on based on
117
+ code from Jan Wikholm.</p>
118
+
119
+ </div>
120
+
121
+ <div id="validator-badges">
122
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
123
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
124
+ Rdoc Generator</a> 2</small>.</p>
125
+ </div>
126
+ </body>
127
+ </html>
128
+
data/doc/Rakefile.html ADDED
@@ -0,0 +1,148 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=IBM437" http-equiv="Content-Type" />
8
+
9
+ <title>File: Rakefile [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="./js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="./js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="./js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file">
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="project-metadata">
36
+
37
+
38
+ <div id="fileindex-section" class="section project-section">
39
+ <h3 class="section-header">Files</h3>
40
+ <ul>
41
+
42
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
43
+
44
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
45
+
46
+ </ul>
47
+ </div>
48
+
49
+
50
+ <div id="classindex-section" class="section project-section">
51
+ <h3 class="section-header">Class Index
52
+ <span class="search-toggle"><img src="./images/find.png"
53
+ height="16" width="16" alt="[+]"
54
+ title="show/hide quicksearch" /></span></h3>
55
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
56
+ <fieldset>
57
+ <legend>Quicksearch</legend>
58
+ <input type="text" name="quicksearch" value=""
59
+ class="quicksearch-field" />
60
+ </fieldset>
61
+ </form>
62
+
63
+ <ul class="link-list">
64
+
65
+ <li><a href="./Vizi.html">Vizi</a></li>
66
+
67
+ <li><a href="./Vizi/LogFormat.html">Vizi::LogFormat</a></li>
68
+
69
+ <li><a href="./Vizi/LogParser.html">Vizi::LogParser</a></li>
70
+
71
+ <li><a href="./Vizi/Visit.html">Vizi::Visit</a></li>
72
+
73
+ <li><a href="./Vizi/VisitList.html">Vizi::VisitList</a></li>
74
+
75
+ <li><a href="./Object.html">Object</a></li>
76
+
77
+ <li><a href="./ParserTest.html">ParserTest</a></li>
78
+
79
+ </ul>
80
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
81
+ </div>
82
+
83
+
84
+ </div>
85
+ </div>
86
+
87
+ <div id="documentation">
88
+
89
+ <p>require 'rubygems' require 'rake/gempackagetask' require 'rake/rdoctask'
90
+ require 'rake/testtask'</p>
91
+
92
+ <p>spec = Gem::Specification.new do |s|</p>
93
+
94
+ <pre>s.name = &quot;http-log-parser&quot;
95
+ s.version = &quot;0.0.2&quot;
96
+ s.author = &quot;Torsten Curdt&quot;
97
+ s.email = &quot;tcurdt at vafer.org&quot;
98
+ s.homepage = &quot;http://github.com/tcurdt/http-log-parser&quot;
99
+ s.description = &quot;HTTP log file parser&quot;
100
+ s.summary = &quot;A package for parsing web server logs.&quot;
101
+ s.platform = Gem::Platform::RUBY
102
+ s.has_rdoc = true
103
+ s.extra_rdoc_files = [&quot;README.rdoc&quot;]
104
+ s.require_path = &quot;lib&quot;
105
+ s.files = %w(README.rdoc Rakefile) + Dir.glob(&quot;lib/**/*&quot;)</pre>
106
+
107
+ <p>end</p>
108
+
109
+ <p>Rake::GemPackageTask.new(spec) do |pkg|</p>
110
+
111
+ <pre>pkg.need_tar = true</pre>
112
+
113
+ <p>end</p>
114
+
115
+ <p>Rake::RDocTask.new(:rdoc) do |rdoc|</p>
116
+
117
+ <pre>rdoc.rdoc_dir = 'rdoc'
118
+ rdoc.title = 'HttpLogParser'
119
+ rdoc.options &lt;&lt; '--line-numbers' &lt;&lt; '--inline-source'
120
+ rdoc.rdoc_files.include('README')
121
+ rdoc.rdoc_files.include('lib/**/*.rb')</pre>
122
+
123
+ <p>end</p>
124
+
125
+ <p>Rake::TestTask.new do |t|</p>
126
+
127
+ <pre>t.libs &lt;&lt; 'test'
128
+ t.test_files = FileList[&quot;test/**/*_test.rb&quot;]
129
+ t.verbose = true</pre>
130
+
131
+ <p>end</p>
132
+
133
+ <p>task :default =&gt; "pkg/#{spec.name}-#{spec.version}.gem" do</p>
134
+
135
+ <pre>puts &quot;generated latest version&quot;</pre>
136
+
137
+ <p>end</p>
138
+
139
+ </div>
140
+
141
+ <div id="validator-badges">
142
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
143
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
144
+ Rdoc Generator</a> 2</small>.</p>
145
+ </div>
146
+ </body>
147
+ </html>
148
+
data/doc/Visit.html ADDED
@@ -0,0 +1,487 @@
1
+ <?xml version="1.0" encoding="IBM437"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=IBM437" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Visit</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="class">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="./index.html">Home</a>
25
+ <a href="./index.html#classes">Classes</a>
26
+ <a href="./index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="./lib/vizi/parser_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="lib/vizi/parser.rb">lib/vizi/parser.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+ <!-- Parent Class -->
50
+ <div id="parent-class-section" class="section">
51
+ <h3 class="section-header">Parent</h3>
52
+
53
+ <p class="link"><a href="Object.html">Object</a></p>
54
+
55
+ </div>
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+ <!-- Method Quickref -->
64
+ <div id="method-list-section" class="section">
65
+ <h3 class="section-header">Methods</h3>
66
+ <ul class="link-list">
67
+
68
+ <li><a href="#method-c-new">::new</a></li>
69
+
70
+ <li><a href="#method-i-sendoutput">#sendoutput</a></li>
71
+
72
+ <li><a href="#method-i-update">#update</a></li>
73
+
74
+ </ul>
75
+ </div>
76
+
77
+
78
+
79
+ </div>
80
+
81
+ <div id="project-metadata">
82
+
83
+
84
+ <div id="fileindex-section" class="section project-section">
85
+ <h3 class="section-header">Files</h3>
86
+ <ul>
87
+
88
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
89
+
90
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
91
+
92
+ </ul>
93
+ </div>
94
+
95
+
96
+ <div id="classindex-section" class="section project-section">
97
+ <h3 class="section-header">Class/Module Index
98
+ <span class="search-toggle"><img src="./images/find.png"
99
+ height="16" width="16" alt="[+]"
100
+ title="show/hide quicksearch" /></span></h3>
101
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
102
+ <fieldset>
103
+ <legend>Quicksearch</legend>
104
+ <input type="text" name="quicksearch" value=""
105
+ class="quicksearch-field" />
106
+ </fieldset>
107
+ </form>
108
+
109
+ <ul class="link-list">
110
+
111
+ <li><a href="./Object.html">Object</a></li>
112
+
113
+ <li><a href="./ParserTest.html">ParserTest</a></li>
114
+
115
+ <li><a href="./Visit.html">Visit</a></li>
116
+
117
+ <li><a href="./VisitList.html">VisitList</a></li>
118
+
119
+ <li><a href="./ViziLogFormat.html">ViziLogFormat</a></li>
120
+
121
+ <li><a href="./ViziLogParser.html">ViziLogParser</a></li>
122
+
123
+ </ul>
124
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
125
+ </div>
126
+
127
+
128
+ </div>
129
+ </div>
130
+
131
+ <div id="documentation">
132
+ <h1 class="class">Visit</h1>
133
+
134
+ <div id="description" class="description">
135
+
136
+ <h2>This class creates and stores information related to each visit</h2>
137
+
138
+ <p>Visits are determined on the basis of the IP Address hits during a timed
139
+ interval Created by ...</p>
140
+
141
+ </div><!-- description -->
142
+
143
+
144
+ <div id="5Buntitled-5D" class="documentation-section">
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <!-- Attributes -->
153
+ <div id="attribute-method-details" class="method-section section">
154
+ <h3 class="section-header">Attributes</h3>
155
+
156
+
157
+ <div id="duration-attribute-method" class="method-detail">
158
+ <a name="duration"></a>
159
+
160
+ <a name="duration="></a>
161
+
162
+ <div class="method-heading attribute-method-heading">
163
+ <span class="method-name">duration</span><span
164
+ class="attribute-access-type">[RW]</span>
165
+ </div>
166
+
167
+ <div class="method-description">
168
+
169
+
170
+
171
+ </div>
172
+ </div>
173
+
174
+ <div id="end_dt-attribute-method" class="method-detail">
175
+ <a name="end_dt"></a>
176
+
177
+ <a name="end_dt="></a>
178
+
179
+ <div class="method-heading attribute-method-heading">
180
+ <span class="method-name">end_dt</span><span
181
+ class="attribute-access-type">[RW]</span>
182
+ </div>
183
+
184
+ <div class="method-description">
185
+
186
+
187
+
188
+ </div>
189
+ </div>
190
+
191
+ <div id="expire_dt-attribute-method" class="method-detail">
192
+ <a name="expire_dt"></a>
193
+
194
+ <a name="expire_dt="></a>
195
+
196
+ <div class="method-heading attribute-method-heading">
197
+ <span class="method-name">expire_dt</span><span
198
+ class="attribute-access-type">[RW]</span>
199
+ </div>
200
+
201
+ <div class="method-description">
202
+
203
+
204
+
205
+ </div>
206
+ </div>
207
+
208
+ <div id="hits-attribute-method" class="method-detail">
209
+ <a name="hits"></a>
210
+
211
+ <a name="hits="></a>
212
+
213
+ <div class="method-heading attribute-method-heading">
214
+ <span class="method-name">hits</span><span
215
+ class="attribute-access-type">[RW]</span>
216
+ </div>
217
+
218
+ <div class="method-description">
219
+
220
+
221
+
222
+ </div>
223
+ </div>
224
+
225
+ <div id="ip-attribute-method" class="method-detail">
226
+ <a name="ip"></a>
227
+
228
+ <a name="ip="></a>
229
+
230
+ <div class="method-heading attribute-method-heading">
231
+ <span class="method-name">ip</span><span
232
+ class="attribute-access-type">[RW]</span>
233
+ </div>
234
+
235
+ <div class="method-description">
236
+
237
+
238
+
239
+ </div>
240
+ </div>
241
+
242
+ <div id="pages-attribute-method" class="method-detail">
243
+ <a name="pages"></a>
244
+
245
+ <a name="pages="></a>
246
+
247
+ <div class="method-heading attribute-method-heading">
248
+ <span class="method-name">pages</span><span
249
+ class="attribute-access-type">[RW]</span>
250
+ </div>
251
+
252
+ <div class="method-description">
253
+
254
+
255
+
256
+ </div>
257
+ </div>
258
+
259
+ <div id="robots-attribute-method" class="method-detail">
260
+ <a name="robots"></a>
261
+
262
+ <a name="robots="></a>
263
+
264
+ <div class="method-heading attribute-method-heading">
265
+ <span class="method-name">robots</span><span
266
+ class="attribute-access-type">[RW]</span>
267
+ </div>
268
+
269
+ <div class="method-description">
270
+
271
+
272
+
273
+ </div>
274
+ </div>
275
+
276
+ <div id="searchphrase-attribute-method" class="method-detail">
277
+ <a name="searchphrase"></a>
278
+
279
+ <a name="searchphrase="></a>
280
+
281
+ <div class="method-heading attribute-method-heading">
282
+ <span class="method-name">searchphrase</span><span
283
+ class="attribute-access-type">[RW]</span>
284
+ </div>
285
+
286
+ <div class="method-description">
287
+
288
+
289
+
290
+ </div>
291
+ </div>
292
+
293
+ <div id="start_dt-attribute-method" class="method-detail">
294
+ <a name="start_dt"></a>
295
+
296
+ <a name="start_dt="></a>
297
+
298
+ <div class="method-heading attribute-method-heading">
299
+ <span class="method-name">start_dt</span><span
300
+ class="attribute-access-type">[RW]</span>
301
+ </div>
302
+
303
+ <div class="method-description">
304
+
305
+
306
+
307
+ </div>
308
+ </div>
309
+
310
+ <div id="visitortype-attribute-method" class="method-detail">
311
+ <a name="visitortype"></a>
312
+
313
+ <a name="visitortype="></a>
314
+
315
+ <div class="method-heading attribute-method-heading">
316
+ <span class="method-name">visitortype</span><span
317
+ class="attribute-access-type">[RW]</span>
318
+ </div>
319
+
320
+ <div class="method-description">
321
+
322
+
323
+
324
+ </div>
325
+ </div>
326
+
327
+ </div><!-- attribute-method-details -->
328
+
329
+
330
+ <!-- Methods -->
331
+
332
+ <div id="public-class-method-details" class="method-section section">
333
+ <h3 class="section-header">Public Class Methods</h3>
334
+
335
+
336
+ <div id="new-method" class="method-detail ">
337
+ <a name="method-c-new"></a>
338
+
339
+
340
+ <div class="method-heading">
341
+ <span class="method-name">new</span><span
342
+ class="method-args">(ip, logdt, csuristem, csuriquery, p_visitortype, p_pageflag, p_searchphrase, visit_timeout)</span>
343
+ <span class="method-click-advice">click to toggle source</span>
344
+ </div>
345
+
346
+
347
+ <div class="method-description">
348
+
349
+
350
+
351
+
352
+
353
+ <div class="method-source-code" id="new-source">
354
+ <pre>
355
+ <span class="ruby-comment"># File lib/vizi/parser.rb, line 277</span>
356
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ip</span>, <span class="ruby-identifier">logdt</span>, <span class="ruby-identifier">csuristem</span>, <span class="ruby-identifier">csuriquery</span>, <span class="ruby-identifier">p_visitortype</span>, <span class="ruby-identifier">p_pageflag</span>, <span class="ruby-identifier">p_searchphrase</span>, <span class="ruby-identifier">visit_timeout</span>)
357
+ <span class="ruby-ivar">@ip</span> = <span class="ruby-identifier">ip</span>
358
+ <span class="ruby-ivar">@start_dt</span> = <span class="ruby-identifier">logdt</span>
359
+ <span class="ruby-ivar">@expire_dt</span> = <span class="ruby-ivar">@start_dt</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">visit_timeout</span>
360
+ <span class="ruby-ivar">@end_dt</span> = <span class="ruby-ivar">@start_dt</span>
361
+ <span class="ruby-ivar">@duration</span> = <span class="ruby-value">0</span>
362
+ <span class="ruby-ivar">@hits</span> = <span class="ruby-value">1</span>
363
+ <span class="ruby-ivar">@pages</span> = <span class="ruby-value">0</span>
364
+ <span class="ruby-ivar">@pages</span> = <span class="ruby-value">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">p_pageflag</span>
365
+ <span class="ruby-ivar">@visitortype</span> = <span class="ruby-identifier">p_visitortype</span>
366
+ <span class="ruby-ivar">@robots</span> = <span class="ruby-keyword">false</span>
367
+ <span class="ruby-ivar">@robots</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">csuristem</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;/robots.txt&quot;</span>
368
+ <span class="ruby-ivar">@visitortype</span> = <span class="ruby-string">&quot;S&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">robots</span>
369
+ <span class="ruby-ivar">@searchphrase</span> = <span class="ruby-string">&quot;&quot;</span>
370
+ <span class="ruby-ivar">@searchphrase</span> = <span class="ruby-identifier">p_searchphrase</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">p_searchphrase</span>.<span class="ruby-identifier">nil?</span>
371
+ <span class="ruby-ivar">@pageids</span> = []
372
+ <span class="ruby-identifier">z</span>=(<span class="ruby-regexp">/(PageID)=(\d+)/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">csuriquery</span>)
373
+ <span class="ruby-ivar">@pageids</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">z</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">nil?</span>
374
+ <span class="ruby-comment"># p csuriquery
375
+ <span class="ruby-comment"># p @pageids
376
+ <span class="ruby-keyword">end</span></pre>
377
+ </div><!-- new-source -->
378
+
379
+ </div>
380
+
381
+
382
+
383
+
384
+ </div><!-- new-method -->
385
+
386
+
387
+ </div><!-- public-class-method-details -->
388
+
389
+ <div id="public-instance-method-details" class="method-section section">
390
+ <h3 class="section-header">Public Instance Methods</h3>
391
+
392
+
393
+ <div id="sendoutput-method" class="method-detail ">
394
+ <a name="method-i-sendoutput"></a>
395
+
396
+
397
+ <div class="method-heading">
398
+ <span class="method-name">sendoutput</span><span
399
+ class="method-args">()</span>
400
+ <span class="method-click-advice">click to toggle source</span>
401
+ </div>
402
+
403
+
404
+ <div class="method-description">
405
+
406
+
407
+
408
+
409
+
410
+ <div class="method-source-code" id="sendoutput-source">
411
+ <pre>
412
+ <span class="ruby-comment"># File lib/vizi/parser.rb, line 312</span>
413
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">sendoutput</span>
414
+ <span class="ruby-comment">#if @pages &gt; 0
415
+ <span class="ruby-identifier">iplong</span> = <span class="ruby-ivar">@ip</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-string">&quot; &quot;</span>
416
+ <span class="ruby-identifier">p</span> <span class="ruby-string">&quot;&gt; &quot;</span><span class="ruby-operator">+</span><span class="ruby-identifier">iplong</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">14</span>]<span class="ruby-operator">+</span><span class="ruby-string">&quot; &quot;</span><span class="ruby-operator">+</span><span class="ruby-ivar">@start_dt</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">18</span>]<span class="ruby-operator">+</span><span class="ruby-string">&quot; &quot;</span><span class="ruby-operator">+</span><span class="ruby-ivar">@visitortype</span><span class="ruby-operator">+</span><span class="ruby-string">&quot; Hits&gt; &quot;</span><span class="ruby-operator">+</span><span class="ruby-ivar">@hits</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-string">&quot; Pgs&gt; &quot;</span><span class="ruby-operator">+</span><span class="ruby-ivar">@pages</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-string">&quot; Dur&gt; &quot;</span><span class="ruby-operator">+</span><span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">+</span><span class="ruby-string">&quot; Phrase&gt; &quot;</span><span class="ruby-operator">+</span><span class="ruby-ivar">@searchphrase</span>
417
+ <span class="ruby-identifier">p</span> <span class="ruby-ivar">@pageids</span>
418
+ <span class="ruby-comment">#end
419
+ <span class="ruby-keyword">end</span></pre>
420
+ </div><!-- sendoutput-source -->
421
+
422
+ </div>
423
+
424
+
425
+
426
+
427
+ </div><!-- sendoutput-method -->
428
+
429
+
430
+ <div id="update-method" class="method-detail ">
431
+ <a name="method-i-update"></a>
432
+
433
+
434
+ <div class="method-heading">
435
+ <span class="method-name">update</span><span
436
+ class="method-args">(logdt, csuriquery, p_visitortype, p_pageflag, p_searchphrase)</span>
437
+ <span class="method-click-advice">click to toggle source</span>
438
+ </div>
439
+
440
+
441
+ <div class="method-description">
442
+
443
+
444
+
445
+
446
+
447
+ <div class="method-source-code" id="update-source">
448
+ <pre>
449
+ <span class="ruby-comment"># File lib/vizi/parser.rb, line 299</span>
450
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">logdt</span>, <span class="ruby-identifier">csuriquery</span>, <span class="ruby-identifier">p_visitortype</span>, <span class="ruby-identifier">p_pageflag</span>, <span class="ruby-identifier">p_searchphrase</span>)
451
+ <span class="ruby-ivar">@end_dt</span> = <span class="ruby-identifier">logdt</span>
452
+ <span class="ruby-ivar">@hits</span> = <span class="ruby-ivar">@hits</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
453
+ <span class="ruby-ivar">@pages</span> = <span class="ruby-ivar">@pages</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">p_pageflag</span>
454
+ <span class="ruby-ivar">@duration</span> = (<span class="ruby-ivar">@end_dt</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start_dt</span>).<span class="ruby-identifier">to_i</span>
455
+ <span class="ruby-ivar">@visitortype</span> = <span class="ruby-identifier">p_visitortype</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@visitortype</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;H&quot;</span>
456
+ <span class="ruby-ivar">@searchphrase</span> = <span class="ruby-identifier">p_searchphrase</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">p_searchphrase</span>.<span class="ruby-identifier">nil?</span>
457
+ <span class="ruby-identifier">z</span>=(<span class="ruby-regexp">/(PageID)=(\d+)/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">csuriquery</span>)
458
+ <span class="ruby-ivar">@pageids</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">z</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">z</span>.<span class="ruby-identifier">nil?</span>
459
+ <span class="ruby-comment"># p csuriquery
460
+ <span class="ruby-comment"># p @pageids
461
+ <span class="ruby-keyword">end</span></pre>
462
+ </div><!-- update-source -->
463
+
464
+ </div>
465
+
466
+
467
+
468
+
469
+ </div><!-- update-method -->
470
+
471
+
472
+ </div><!-- public-instance-method-details -->
473
+
474
+ </div><!-- 5Buntitled-5D -->
475
+
476
+
477
+ </div><!-- documentation -->
478
+
479
+ <div id="validator-badges">
480
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
481
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
482
+ Rdoc Generator</a> 2</small>.</p>
483
+ </div>
484
+
485
+ </body>
486
+ </html>
487
+