wwwjdic 13.0.0

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.
Files changed (130) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +419 -0
  3. data/COPYING.md +675 -0
  4. data/Gemfile +21 -0
  5. data/README.md +303 -0
  6. data/Rakefile +52 -0
  7. data/acknowledgements.md +55 -0
  8. data/authors.md +67 -0
  9. data/copyright.md +377 -0
  10. data/examples/basics.rb +117 -0
  11. data/examples/translate.rb +128 -0
  12. data/examples/uri.rb +129 -0
  13. data/html/CHANGELOG.html +597 -0
  14. data/html/COPYING_md.html +389 -0
  15. data/html/Gemfile.html +104 -0
  16. data/html/Object.html +185 -0
  17. data/html/README_md.html +343 -0
  18. data/html/Rakefile.html +137 -0
  19. data/html/WWWJDic/ParsableDuckType.html +159 -0
  20. data/html/WWWJDic/Parser.html +233 -0
  21. data/html/WWWJDic/Parsers/Dict.html +191 -0
  22. data/html/WWWJDic/Parsers/Display.html +184 -0
  23. data/html/WWWJDic/Parsers/Key.html +221 -0
  24. data/html/WWWJDic/Parsers/Search.html +214 -0
  25. data/html/WWWJDic/Parsers/Server.html +182 -0
  26. data/html/WWWJDic/Parsers.html +96 -0
  27. data/html/WWWJDic/Splitter.html +378 -0
  28. data/html/WWWJDic/Utils/Downloader/Downloader.html +227 -0
  29. data/html/WWWJDic/Utils/Downloader.html +108 -0
  30. data/html/WWWJDic/Utils/Raisers.html +235 -0
  31. data/html/WWWJDic/Utils.html +108 -0
  32. data/html/WWWJDic/WWWJDic.html +715 -0
  33. data/html/WWWJDic.html +348 -0
  34. data/html/acknowledgements_md.html +149 -0
  35. data/html/authors_md.html +181 -0
  36. data/html/copyright_md.html +422 -0
  37. data/html/created.rid +59 -0
  38. data/html/css/fonts.css +167 -0
  39. data/html/css/rdoc.css +590 -0
  40. data/html/fonts/Lato-Light.ttf +0 -0
  41. data/html/fonts/Lato-LightItalic.ttf +0 -0
  42. data/html/fonts/Lato-Regular.ttf +0 -0
  43. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  44. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  45. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  46. data/html/images/add.png +0 -0
  47. data/html/images/arrow_up.png +0 -0
  48. data/html/images/brick.png +0 -0
  49. data/html/images/brick_link.png +0 -0
  50. data/html/images/bug.png +0 -0
  51. data/html/images/bullet_black.png +0 -0
  52. data/html/images/bullet_toggle_minus.png +0 -0
  53. data/html/images/bullet_toggle_plus.png +0 -0
  54. data/html/images/date.png +0 -0
  55. data/html/images/delete.png +0 -0
  56. data/html/images/find.png +0 -0
  57. data/html/images/loadingAnimation.gif +0 -0
  58. data/html/images/macFFBgHack.png +0 -0
  59. data/html/images/package.png +0 -0
  60. data/html/images/page_green.png +0 -0
  61. data/html/images/page_white_text.png +0 -0
  62. data/html/images/page_white_width.png +0 -0
  63. data/html/images/plugin.png +0 -0
  64. data/html/images/ruby.png +0 -0
  65. data/html/images/tag_blue.png +0 -0
  66. data/html/images/tag_green.png +0 -0
  67. data/html/images/transparent.png +0 -0
  68. data/html/images/wrench.png +0 -0
  69. data/html/images/wrench_orange.png +0 -0
  70. data/html/images/zoom.png +0 -0
  71. data/html/index.html +363 -0
  72. data/html/js/darkfish.js +161 -0
  73. data/html/js/jquery.js +4 -0
  74. data/html/js/navigation.js +141 -0
  75. data/html/js/navigation.js.gz +0 -0
  76. data/html/js/search.js +109 -0
  77. data/html/js/search_index.js +1 -0
  78. data/html/js/search_index.js.gz +0 -0
  79. data/html/js/searcher.js +229 -0
  80. data/html/js/searcher.js.gz +0 -0
  81. data/html/table_of_contents.html +541 -0
  82. data/html/wwwjdic_gemspec.html +161 -0
  83. data/lib/wwwjdic/application.rb +233 -0
  84. data/lib/wwwjdic/constants.rb +113 -0
  85. data/lib/wwwjdic/locales/de.yml +29 -0
  86. data/lib/wwwjdic/locales/en.yml +29 -0
  87. data/lib/wwwjdic/locales/es.yml +29 -0
  88. data/lib/wwwjdic/locales/fr.yml +29 -0
  89. data/lib/wwwjdic/locales/hu.yml +29 -0
  90. data/lib/wwwjdic/locales/it.yml +29 -0
  91. data/lib/wwwjdic/locales/ja.yml +30 -0
  92. data/lib/wwwjdic/locales/nl.yml +29 -0
  93. data/lib/wwwjdic/locales/ru.yml +29 -0
  94. data/lib/wwwjdic/locales/sl.yml +29 -0
  95. data/lib/wwwjdic/locales/sv.yml +29 -0
  96. data/lib/wwwjdic/parser.rb +46 -0
  97. data/lib/wwwjdic/parsers/dict.rb +58 -0
  98. data/lib/wwwjdic/parsers/display.rb +50 -0
  99. data/lib/wwwjdic/parsers/key.rb +75 -0
  100. data/lib/wwwjdic/parsers/search.rb +60 -0
  101. data/lib/wwwjdic/parsers/server.rb +47 -0
  102. data/lib/wwwjdic/utils/downloader.rb +135 -0
  103. data/lib/wwwjdic/utils/raisers.rb +67 -0
  104. data/lib/wwwjdic/utils/splitter.rb +84 -0
  105. data/lib/wwwjdic/version.rb +20 -0
  106. data/lib/wwwjdic.rb +57 -0
  107. data/test/test_helper.rb +40 -0
  108. data/test/test_wwwjdic.rb +32 -0
  109. data/test/wwwjdic/locales/de.yml +22 -0
  110. data/test/wwwjdic/locales/en.yml +22 -0
  111. data/test/wwwjdic/locales/es.yml +22 -0
  112. data/test/wwwjdic/locales/fr.yml +22 -0
  113. data/test/wwwjdic/locales/hu.yml +22 -0
  114. data/test/wwwjdic/locales/it.yml +21 -0
  115. data/test/wwwjdic/locales/ja.yml +23 -0
  116. data/test/wwwjdic/locales/nl.yml +22 -0
  117. data/test/wwwjdic/locales/ru.yml +22 -0
  118. data/test/wwwjdic/locales/sl.yml +22 -0
  119. data/test/wwwjdic/locales/sv.yml +22 -0
  120. data/test/wwwjdic/locales/test_locales.rb +65 -0
  121. data/test/wwwjdic/parsers/test_dict.rb +73 -0
  122. data/test/wwwjdic/parsers/test_display.rb +51 -0
  123. data/test/wwwjdic/parsers/test_key.rb +52 -0
  124. data/test/wwwjdic/parsers/test_server.rb +51 -0
  125. data/test/wwwjdic/test_application.rb +219 -0
  126. data/test/wwwjdic/test_parsable_duck_type.rb +37 -0
  127. data/test/wwwjdic/utils/test_downloader.rb +41 -0
  128. data/test/wwwjdic/utils/test_raisers.rb +59 -0
  129. data/wwwjdic.gemspec +74 -0
  130. metadata +309 -0
data/copyright.md ADDED
@@ -0,0 +1,377 @@
1
+ <!--
2
+ wwwjdic
3
+
4
+ Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
5
+
6
+ This file is part of wwwjdic.
7
+
8
+ wwwjdic is free software: you can redistribute it and/or modify it under
9
+ the terms of the GNU General Public License as published by the Free
10
+ Software Foundation, either version 3 of the License, or (at your
11
+ option) any later version.
12
+
13
+ wwwjdic is distributed in the hope that it will be useful, but WITHOUT
14
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16
+ more details.
17
+
18
+ You should have received a copy of the GNU General Public License along
19
+ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
20
+ -->
21
+
22
+ # Copyright Notes
23
+ 2019-02-26 update.
24
+
25
+ wwwjdic
26
+
27
+ Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
28
+
29
+ This file is part of wwwjdic.
30
+
31
+ wwwjdic is free software: you can redistribute it and/or modify it under
32
+ the terms of the GNU General Public License as published by the Free
33
+ Software Foundation, either version 3 of the License, or (at your
34
+ option) any later version.
35
+
36
+ wwwjdic is distributed in the hope that it will be useful, but WITHOUT
37
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
38
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
39
+ more details.
40
+
41
+ You should have received a copy of the GNU General Public License along
42
+ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
43
+
44
+ All project files, except for those listed in whole RDoc section below
45
+ are released according to the above notice. The contributed code by
46
+ Peter R. Marreck and Jon Maken are released according to their own
47
+ licenses, specified inside the source code and checked being compatible
48
+ with GNU GPLv3 license and the free software philosophy.
49
+
50
+
51
+ ## RDoc
52
+ Documents in the html directory are automatically generated by Ruby RDoc
53
+ tool, with Markdown syntax. Automatically included files have the
54
+ following licenses:
55
+
56
+ ### Darkfish (darkfish.js & rdoc.css)
57
+ See http://www.ruby-doc.org/stdlib-2.0/libdoc/rdoc/rdoc/RDoc/Generator/Darkfish.html
58
+
59
+ Copyright © 2007, 2008, Michael Granger. All rights reserved.
60
+
61
+ Redistribution and use in source and binary forms, with or without
62
+ modification, are permitted provided that the following conditions are
63
+ met:
64
+
65
+ Redistributions of source code must retain the above copyright notice,
66
+ this list of conditions and the following disclaimer.
67
+
68
+ Redistributions in binary form must reproduce the above copyright
69
+ notice, this list of conditions and the following disclaimer in the
70
+ documentation and/or other materials provided with the distribution.
71
+
72
+ Neither the name of the author/s, nor the names of the project's
73
+ contributors may be used to endorse or promote products derived from
74
+ this software without specific prior written permission.
75
+
76
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
77
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
78
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
79
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
80
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
81
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
82
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
83
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
84
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
85
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
86
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
87
+
88
+ Darkfish uses the Silk Icons set by Mark James.
89
+
90
+ ### Sorce Code Pro Font (& fonts.css)
91
+ Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
92
+ with Reserved Font Name "Source". All Rights Reserved. Source is a
93
+ trademark of Adobe Systems Incorporated in the United States and/or
94
+ other countries.
95
+
96
+ This Font Software is licensed under the SIL Open Font License, Version
97
+ 1.1.
98
+
99
+ This license is copied below, and is also available with a FAQ at:
100
+ http://scripts.sil.org/OFL
101
+
102
+ /*
103
+ * -----------------------------------------------------------
104
+ * SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
105
+ * -----------------------------------------------------------
106
+ *
107
+ * PREAMBLE
108
+ * The goals of the Open Font License (OFL) are to stimulate
109
+ * worldwide development of collaborative font projects, to support
110
+ * the font creation efforts of academic and linguistic communities,
111
+ * and to provide a free and open framework in which fonts may be
112
+ * shared and improved in partnership with others.
113
+ *
114
+ * The OFL allows the licensed fonts to be used, studied, modified
115
+ * and redistributed freely as long as they are not sold by
116
+ * themselves. The fonts, including any derivative works, can be
117
+ * bundled, embedded, redistributed and/or sold with any software
118
+ * provided that any reserved names are not used by derivative
119
+ * works. The fonts and derivatives, however, cannot be released
120
+ * under any other type of license. The requirement for fonts to
121
+ * remain under this license does not apply to any document created
122
+ * using the fonts or their derivatives.
123
+ *
124
+ * DEFINITIONS
125
+ * "Font Software" refers to the set of files released by the
126
+ * Copyright Holder(s) under this license and clearly marked as
127
+ * such. This may include source files, build scripts and
128
+ * documentation.
129
+ *
130
+ * "Reserved Font Name" refers to any names specified as such after
131
+ * the copyright statement(s).
132
+ *
133
+ * "Original Version" refers to the collection of Font Software
134
+ * components as distributed by the Copyright Holder(s).
135
+ *
136
+ * "Modified Version" refers to any derivative made by adding to,
137
+ * deleting, or substituting -- in part or in whole -- any of the
138
+ * components of the Original Version, by changing formats or by
139
+ * porting the Font Software to a new environment.
140
+ *
141
+ * "Author" refers to any designer, engineer, programmer, technical
142
+ * writer or other person who contributed to the Font Software.
143
+ *
144
+ * PERMISSION & CONDITIONS
145
+ * Permission is hereby granted, free of charge, to any person
146
+ * obtaining a copy of the Font Software, to use, study, copy,
147
+ * merge, embed, modify, redistribute, and sell modified and
148
+ * unmodified copies of the Font Software, subject to the following
149
+ * conditions:
150
+ *
151
+ * 1) Neither the Font Software nor any of its individual
152
+ * components, in Original or Modified Versions, may be sold by
153
+ * itself.
154
+ *
155
+ * 2) Original or Modified Versions of the Font Software may be
156
+ * bundled, redistributed and/or sold with any software, provided
157
+ * that each copy contains the above copyright notice and this
158
+ * license. These can be included either as stand-alone text files,
159
+ * human-readable headers or in the appropriate machine-readable
160
+ * metadata fields within text or binary files as long as those
161
+ * fields can be easily viewed by the user.
162
+ *
163
+ * 3) No Modified Version of the Font Software may use the Reserved
164
+ * Font Name(s) unless explicit written permission is granted by the
165
+ * corresponding Copyright Holder. This restriction only applies to
166
+ * the primary font name as presented to the users.
167
+ *
168
+ * 4) The name(s) of the Copyright Holder(s) or the Author(s) of the
169
+ * Font Software shall not be used to promote, endorse or advertise
170
+ * any Modified Version, except to acknowledge the contribution(s)
171
+ * of the Copyright Holder(s) and the Author(s) or with their
172
+ * explicit written permission.
173
+ *
174
+ * 5) The Font Software, modified or unmodified, in part or in
175
+ * whole, must be distributed entirely under this license, and must
176
+ * not be distributed under any other license. The requirement for
177
+ * fonts to remain under this license does not apply to any document
178
+ * created using the Font Software.
179
+ *
180
+ * TERMINATION
181
+ * This license becomes null and void if any of the above conditions
182
+ * are not met.
183
+ *
184
+ * DISCLAIMER
185
+ * THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
186
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
187
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
188
+ * AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER
189
+ * RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
190
+ * CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL,
191
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER
192
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
193
+ * THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
194
+ * DEALINGS IN THE FONT SOFTWARE.
195
+ */
196
+
197
+ ### Lato Font
198
+ Copyright (c) 2010, Łukasz Dziedzic (<dziedzic@typoland.com>), with
199
+ Reserved Font Name Lato.
200
+
201
+ This Font Software is licensed under the SIL Open Font License, Version
202
+ 1.1.
203
+
204
+ This license is copied below, and is also available with a FAQ at:
205
+ http://scripts.sil.org/OFL
206
+
207
+ /*
208
+ * -----------------------------------------------------------
209
+ * SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
210
+ * -----------------------------------------------------------
211
+ *
212
+ * PREAMBLE
213
+ * The goals of the Open Font License (OFL) are to stimulate
214
+ * worldwide development of collaborative font projects, to support
215
+ * the font creation efforts of academic and linguistic communities,
216
+ * and to provide a free and open framework in which fonts may be
217
+ * shared and improved in partnership with others.
218
+ *
219
+ * The OFL allows the licensed fonts to be used, studied, modified
220
+ * and redistributed freely as long as they are not sold by
221
+ * themselves. The fonts, including any derivative works, can be
222
+ * bundled, embedded, redistributed and/or sold with any software
223
+ * provided that any reserved names are not used by derivative
224
+ * works. The fonts and derivatives, however, cannot be released
225
+ * under any other type of license. The requirement for fonts to
226
+ * remain under this license does not apply to any document created
227
+ * using the fonts or their derivatives.
228
+ *
229
+ * DEFINITIONS
230
+ * "Font Software" refers to the set of files released by the
231
+ * Copyright Holder(s) under this license and clearly marked as
232
+ * such. This may include source files, build scripts and
233
+ * documentation.
234
+ *
235
+ * "Reserved Font Name" refers to any names specified as such after
236
+ * the copyright statement(s).
237
+ *
238
+ * "Original Version" refers to the collection of Font Software
239
+ * components as distributed by the Copyright Holder(s).
240
+ *
241
+ * "Modified Version" refers to any derivative made by adding to,
242
+ * deleting, or substituting -- in part or in whole -- any of the
243
+ * components of the Original Version, by changing formats or by
244
+ * porting the Font Software to a new environment.
245
+ *
246
+ * "Author" refers to any designer, engineer, programmer, technical
247
+ * writer or other person who contributed to the Font Software.
248
+ *
249
+ * PERMISSION & CONDITIONS
250
+ * Permission is hereby granted, free of charge, to any person
251
+ * obtaining a copy of the Font Software, to use, study, copy,
252
+ * merge, embed, modify, redistribute, and sell modified and
253
+ * unmodified copies of the Font Software, subject to the following
254
+ * conditions:
255
+ *
256
+ * 1) Neither the Font Software nor any of its individual
257
+ * components, in Original or Modified Versions, may be sold by
258
+ * itself.
259
+ *
260
+ * 2) Original or Modified Versions of the Font Software may be
261
+ * bundled, redistributed and/or sold with any software, provided
262
+ * that each copy contains the above copyright notice and this
263
+ * license. These can be included either as stand-alone text files,
264
+ * human-readable headers or in the appropriate machine-readable
265
+ * metadata fields within text or binary files as long as those
266
+ * fields can be easily viewed by the user.
267
+ *
268
+ * 3) No Modified Version of the Font Software may use the Reserved
269
+ * Font Name(s) unless explicit written permission is granted by the
270
+ * corresponding Copyright Holder. This restriction only applies to
271
+ * the primary font name as presented to the users.
272
+ *
273
+ * 4) The name(s) of the Copyright Holder(s) or the Author(s) of the
274
+ * Font Software shall not be used to promote, endorse or advertise
275
+ * any Modified Version, except to acknowledge the contribution(s)
276
+ * of the Copyright Holder(s) and the Author(s) or with their
277
+ * explicit written permission.
278
+ *
279
+ * 5) The Font Software, modified or unmodified, in part or in
280
+ * whole, must be distributed entirely under this license, and must
281
+ * not be distributed under any other license. The requirement for
282
+ * fonts to remain under this license does not apply to any document
283
+ * created using the Font Software.
284
+ *
285
+ * TERMINATION
286
+ * This license becomes null and void if any of the above conditions
287
+ * are not met.
288
+ *
289
+ * DISCLAIMER
290
+ * THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
291
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
292
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
293
+ * AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER
294
+ * RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
295
+ * CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL,
296
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER
297
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
298
+ * THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
299
+ * DEALINGS IN THE FONT SOFTWARE.
300
+ */
301
+
302
+ ### Silk Icons
303
+ See <http://www.famfamfam.com/lab/icons/silk/>
304
+
305
+ This work is licensed under a Creative Commons Attribution 2.5 License.
306
+ This means you may use it for any purpose, and make any changes you
307
+ like. All I ask is that you include a link back to this page in your
308
+ credits (although a giant link on every page of your website really
309
+ isn't needed, contact me to discuss specifics).
310
+
311
+ The icons can also be used under Creative Commons Attribution 3.0
312
+ License (Hi Debian folks!) with the following requirements: As an
313
+ author, I would appreciate a reference to my authorship of the Silk icon
314
+ set contents within a readme file or equivalent documentation for the
315
+ software which includes the set or a subset of the icons contained
316
+ within.
317
+
318
+ ### jquery.js
319
+ jQuery JavaScript Library v1.6.2
320
+ http://jquery.com/
321
+
322
+ Copyright 2011, John Resig
323
+ Dual licensed under the MIT or GPL Version 2 licenses.
324
+ http://jquery.org/license
325
+
326
+ #### Sizzle.js
327
+ Includes Sizzle.js
328
+ http://sizzlejs.com/
329
+
330
+ Copyright 2011, The Dojo Foundation
331
+ Released under the MIT, BSD, and GPL Licenses.
332
+ Date: Thu Jun 30 14:16:56 2011 -0400
333
+
334
+ ### JsonIndex generator (navigation.js & search.js & search_index.js & searcher.js)
335
+ See http://www.ruby-doc.org/stdlib-2.0/libdoc/rdoc/rdoc/RDoc/Generator/JsonIndex.html
336
+
337
+ Copyright © 2009 Vladimir Kolesnikov
338
+
339
+ Permission is hereby granted, free of charge, to any person obtaining a
340
+ copy of this software and associated documentation files (the
341
+ "Software"), to deal in the Software without restriction, including
342
+ without limitation the rights to use, copy, modify, merge, publish,
343
+ distribute, sublicense, and/or sell copies of the Software, and to
344
+ permit persons to whom the Software is furnished to do so, subject to
345
+ the following conditions:
346
+
347
+ The above copyright notice and this permission notice shall be included
348
+ in all copies or substantial portions of the Software.
349
+
350
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
351
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
352
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
353
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
354
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
355
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
356
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
357
+
358
+ ------------------------------------------
359
+
360
+ wwwjdic
361
+
362
+ Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
363
+
364
+ This file is part of wwwjdic.
365
+
366
+ wwwjdic is free software: you can redistribute it and/or modify it under
367
+ the terms of the GNU General Public License as published by the Free
368
+ Software Foundation, either version 3 of the License, or (at your
369
+ option) any later version.
370
+
371
+ wwwjdic is distributed in the hope that it will be useful, but WITHOUT
372
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
373
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
374
+ more details.
375
+
376
+ You should have received a copy of the GNU General Public License along
377
+ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
@@ -0,0 +1,117 @@
1
+ #--
2
+ # wwwjdic
3
+ # Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
4
+ #
5
+ # This file is part of wwwjdic.
6
+ #
7
+ # wwwjdic is free software: you can redistribute it and/or modify it
8
+ # under the terms of the GNU General Public License as published by the
9
+ # Free Software Foundation, either version 3 of the License, or (at your
10
+ # option) any later version.
11
+ #
12
+ # wwwjdic is distributed in the hope that it will be useful, but WITHOUT
13
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15
+ # for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
19
+ #++
20
+
21
+ require_relative '../lib/wwwjdic'
22
+
23
+ i = 0
24
+
25
+ # Creates the WWWJDic object
26
+ puts '------------------------------------------'
27
+ puts "Basics: '#{i}'. Creates the WWWJDic object."
28
+ puts 'irb(main):001:0> a_wwwjdic = WWWJDic::breener'
29
+ a_wwwjdic = WWWJDic::breener
30
+ puts
31
+ i += 1
32
+
33
+ # Prints the (default) dictionary
34
+ puts '------------------------------------------'
35
+ puts "Basics: '#{i}'. Prints the (default) dictionary (0)."
36
+ puts 'irb(main):001:0> puts a_wwwjdic.dictionary'
37
+ puts a_wwwjdic.dictionary
38
+ puts
39
+ i += 1
40
+
41
+ # Prints the (default) server
42
+ # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?)
43
+ puts '------------------------------------------'
44
+ puts "Basics: '#{i}'. Prints the (default) server (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?)."
45
+ puts 'irb(main):001:0> puts a_wwwjdic.server'
46
+ puts a_wwwjdic.server
47
+ puts
48
+ i += 1
49
+
50
+ # Prints the current (default) WWWJDic configuration URL.
51
+ # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)
52
+ puts '------------------------------------------'
53
+ puts "Basics: '#{i}'. Prints the current (default) WWWJDic configuration URL (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)."
54
+ puts 'irb(main):001:0> puts a_wwwjdic'
55
+ puts a_wwwjdic
56
+ puts
57
+ i += 1
58
+
59
+ # Changes the server value to Monash one.
60
+ puts '------------------------------------------'
61
+ puts "Basics: '#{i}'. Change the server value to Monash one."
62
+ puts 'irb(main):001:0> a_wwwjdic.server = :monash'
63
+ a_wwwjdic.server = :monash
64
+ puts
65
+ i += 1
66
+
67
+ # Prints the (currently set) server
68
+ # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?)
69
+ puts '------------------------------------------'
70
+ puts "Basics: '#{i}'. Prints the (currently set) server (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?)."
71
+ puts 'irb(main):001:0> puts a_wwwjdic.server'
72
+ puts a_wwwjdic.server
73
+ puts
74
+ i += 1
75
+
76
+ # Prints the WWWJDic configuration URL with currently set configuration.
77
+ # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
78
+ puts '------------------------------------------'
79
+ puts "Basics: '#{i}'. Prints the WWWJDic configuration URL with currently set configuration (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)."
80
+ puts 'irb(main):001:0> puts a_wwwjdic'
81
+ puts a_wwwjdic
82
+ puts
83
+ i += 1
84
+
85
+ # Resets the configuration to default values.
86
+ # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
87
+ puts '------------------------------------------'
88
+ puts "Basics: '#{i}'. Resets the configuration to default values."
89
+ puts 'irb(main):001:0> a_wwwjdic.reset'
90
+ a_wwwjdic.reset
91
+ puts
92
+ i += 1
93
+
94
+ # Resets the configuration to default values.
95
+ # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
96
+ puts '------------------------------------------'
97
+ puts "Basics: '#{i}'. Translate the word 'word'."
98
+ puts "irb(main):001:0> a_wwwjdic.translate 'word'"
99
+ puts a_wwwjdic.translate 'word'
100
+ puts
101
+ i += 1
102
+
103
+ # Changes the dictionary value to Japanese-Italian one
104
+ puts '------------------------------------------'
105
+ puts "Basics: '#{i}'. Changes the language value to Japanese-Italian one."
106
+ puts "irb(main):001:0> a_wwwjdic.dictionary = 'Japanese-Italian'"
107
+ a_wwwjdic.dictionary = 'Japanese-Italian'
108
+ puts
109
+ i += 1
110
+
111
+ # Prints the current WWWJDic configuration URL.
112
+ # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OM)
113
+ puts '------------------------------------------'
114
+ puts "Basics: '#{i}'. Prints the current WWWJDic configuration URL (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OM)."
115
+ puts 'irb(main):001:0> puts a_wwwjdic'
116
+ puts a_wwwjdic
117
+ puts
@@ -0,0 +1,128 @@
1
+ #--
2
+ # wwwjdic
3
+ # Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
4
+ #
5
+ # This file is part of wwwjdic.
6
+ #
7
+ # wwwjdic is free software: you can redistribute it and/or modify it
8
+ # under the terms of the GNU General Public License as published by the
9
+ # Free Software Foundation, either version 3 of the License, or (at your
10
+ # option) any later version.
11
+ #
12
+ # wwwjdic is distributed in the hope that it will be useful, but WITHOUT
13
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15
+ # for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
19
+ #++
20
+
21
+ require_relative '../lib/wwwjdic'
22
+
23
+ i = 0
24
+
25
+ # Creates the WWWJDic object
26
+ puts '------------------------------------------'
27
+ puts "Basics: '#{i}'. Creates the WWWJDic object."
28
+ puts 'irb(main):001:0> a_wwwjdic = WWWJDic::breener'
29
+ a_wwwjdic = WWWJDic::breener
30
+ puts
31
+ i += 1
32
+
33
+ # Translate '翻訳' in English, with default options
34
+ puts '------------------------------------------'
35
+ puts "Basics: '#{i}'. Translate '翻訳' in English, with default options."
36
+ puts "irb(main):001:0> a_wwwjdic.translate '翻訳'"
37
+ puts a_wwwjdic.translate '翻訳'
38
+ puts
39
+ i += 1
40
+
41
+ # Computes the default raw URI to translate '翻訳' in English
42
+ # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1ZUQ%E7%BF%BB%E8%A8%B3)
43
+ puts '------------------------------------------'
44
+ puts "Basics: '#{i}'. Computes the default raw URI to translate '翻訳' in English (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1ZUQ%E7%BF%BB%E8%A8%B3)."
45
+ puts "irb(main):001:0> a_wwwjdic.raw_uri '翻訳'"
46
+ puts a_wwwjdic.raw_uri '翻訳'
47
+ puts
48
+ i += 1
49
+
50
+ # Computes the default JSON URI to translate '翻訳' in English
51
+ # ({"翻訳":"http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1MUQ%E7%BF%BB%E8%A8%B3"})
52
+ puts '------------------------------------------'
53
+ puts "Basics: '#{i}'. Computes the default JSON URI to translate '翻訳' in English ({\"翻訳\":\"http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1MUQ%E7%BF%BB%E8%A8%B3\"})."
54
+ puts "irb(main):001:0> a_wwwjdic.json_uri '翻訳'"
55
+ puts a_wwwjdic.json_uri '翻訳'
56
+ puts
57
+ i += 1
58
+
59
+ # Computes the default basic URI to translate '翻訳' in Italian
60
+ # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OMUQ%E7%BF%BB%E8%A8%B3)
61
+ puts '------------------------------------------'
62
+ puts "Basics: '#{i}'. Computes the default basic URI to translate '翻訳' in Italian (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OMUQ%E7%BF%BB%E8%A8%B3)."
63
+ puts "irb(main):001:0> a_wwwjdic.uri '翻訳', dict: 'Japanese-Italian'"
64
+ puts a_wwwjdic.uri '翻訳', dict: 'Japanese-Italian'
65
+ puts
66
+ i += 1
67
+
68
+ # Computes the default JSON URI to translate '翻訳' in German
69
+ # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?GMUQ%E7%BF%BB%E8%A8%B3)
70
+ puts '------------------------------------------'
71
+ puts "Basics: '#{i}'. Computes the default basic URI to translate '翻訳' in German, through Monash university URI (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?GMUQ%E7%BF%BB%E8%A8%B3)."
72
+ puts "irb(main):001:0> a_wwwjdic.uri '翻訳', dict: 'Japanese-German (WaDoku)', server: :monash"
73
+ puts a_wwwjdic.uri '翻訳', dict: 'Japanese-German (WaDoku)', server: :monash
74
+ puts
75
+ i += 1
76
+
77
+ # Prints the current (default) WWWJDic configuration URL.
78
+ # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)
79
+ puts '------------------------------------------'
80
+ puts "Basics: '#{i}'. Prints the current (default) WWWJDic configuration URL (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)."
81
+ puts 'irb(main):001:0> puts a_wwwjdic'
82
+ puts a_wwwjdic
83
+ puts
84
+ i += 1
85
+
86
+ # Change the server value to Monash one.
87
+ # ()
88
+ puts '------------------------------------------'
89
+ puts "Basics: '#{i}'. Change the server value to Monash one."
90
+ puts 'irb(main):001:0> a_wwwjdic.server = :monash'
91
+ a_wwwjdic.server = :monash
92
+ puts
93
+ i += 1
94
+
95
+ # Prints the (currently set) server
96
+ # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?)
97
+ puts '------------------------------------------'
98
+ puts "Basics: '#{i}'. Prints the (currently set) server (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?)."
99
+ puts 'irb(main):001:0> puts a_wwwjdic.server'
100
+ puts a_wwwjdic.server
101
+ puts
102
+ i += 1
103
+
104
+ # Prints the WWWJDic configuration URL with currently set configuration.
105
+ # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
106
+ puts '------------------------------------------'
107
+ puts "Basics: '#{i}'. Prints the WWWJDic configuration URL with currently set configuration (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)."
108
+ puts 'irb(main):001:0> puts a_wwwjdic'
109
+ puts a_wwwjdic
110
+ puts
111
+ i += 1
112
+
113
+ # Resets the configuration to default values.
114
+ # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
115
+ puts '------------------------------------------'
116
+ puts "Basics: '#{i}'. Resets the configuration to default values."
117
+ puts 'irb(main):001:0> a_wwwjdic.reset'
118
+ a_wwwjdic.reset
119
+ puts
120
+ i += 1
121
+
122
+ # Prints the current (default) WWWJDic configuration URL.
123
+ # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)
124
+ puts '------------------------------------------'
125
+ puts "Basics: '#{i}'. Prints the current (default) WWWJDic configuration URL (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)."
126
+ puts 'irb(main):001:0> puts a_wwwjdic'
127
+ puts a_wwwjdic
128
+ puts