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.
- checksums.yaml +7 -0
- data/CHANGELOG +419 -0
- data/COPYING.md +675 -0
- data/Gemfile +21 -0
- data/README.md +303 -0
- data/Rakefile +52 -0
- data/acknowledgements.md +55 -0
- data/authors.md +67 -0
- data/copyright.md +377 -0
- data/examples/basics.rb +117 -0
- data/examples/translate.rb +128 -0
- data/examples/uri.rb +129 -0
- data/html/CHANGELOG.html +597 -0
- data/html/COPYING_md.html +389 -0
- data/html/Gemfile.html +104 -0
- data/html/Object.html +185 -0
- data/html/README_md.html +343 -0
- data/html/Rakefile.html +137 -0
- data/html/WWWJDic/ParsableDuckType.html +159 -0
- data/html/WWWJDic/Parser.html +233 -0
- data/html/WWWJDic/Parsers/Dict.html +191 -0
- data/html/WWWJDic/Parsers/Display.html +184 -0
- data/html/WWWJDic/Parsers/Key.html +221 -0
- data/html/WWWJDic/Parsers/Search.html +214 -0
- data/html/WWWJDic/Parsers/Server.html +182 -0
- data/html/WWWJDic/Parsers.html +96 -0
- data/html/WWWJDic/Splitter.html +378 -0
- data/html/WWWJDic/Utils/Downloader/Downloader.html +227 -0
- data/html/WWWJDic/Utils/Downloader.html +108 -0
- data/html/WWWJDic/Utils/Raisers.html +235 -0
- data/html/WWWJDic/Utils.html +108 -0
- data/html/WWWJDic/WWWJDic.html +715 -0
- data/html/WWWJDic.html +348 -0
- data/html/acknowledgements_md.html +149 -0
- data/html/authors_md.html +181 -0
- data/html/copyright_md.html +422 -0
- data/html/created.rid +59 -0
- data/html/css/fonts.css +167 -0
- data/html/css/rdoc.css +590 -0
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +363 -0
- data/html/js/darkfish.js +161 -0
- data/html/js/jquery.js +4 -0
- data/html/js/navigation.js +141 -0
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +109 -0
- data/html/js/search_index.js +1 -0
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +229 -0
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +541 -0
- data/html/wwwjdic_gemspec.html +161 -0
- data/lib/wwwjdic/application.rb +233 -0
- data/lib/wwwjdic/constants.rb +113 -0
- data/lib/wwwjdic/locales/de.yml +29 -0
- data/lib/wwwjdic/locales/en.yml +29 -0
- data/lib/wwwjdic/locales/es.yml +29 -0
- data/lib/wwwjdic/locales/fr.yml +29 -0
- data/lib/wwwjdic/locales/hu.yml +29 -0
- data/lib/wwwjdic/locales/it.yml +29 -0
- data/lib/wwwjdic/locales/ja.yml +30 -0
- data/lib/wwwjdic/locales/nl.yml +29 -0
- data/lib/wwwjdic/locales/ru.yml +29 -0
- data/lib/wwwjdic/locales/sl.yml +29 -0
- data/lib/wwwjdic/locales/sv.yml +29 -0
- data/lib/wwwjdic/parser.rb +46 -0
- data/lib/wwwjdic/parsers/dict.rb +58 -0
- data/lib/wwwjdic/parsers/display.rb +50 -0
- data/lib/wwwjdic/parsers/key.rb +75 -0
- data/lib/wwwjdic/parsers/search.rb +60 -0
- data/lib/wwwjdic/parsers/server.rb +47 -0
- data/lib/wwwjdic/utils/downloader.rb +135 -0
- data/lib/wwwjdic/utils/raisers.rb +67 -0
- data/lib/wwwjdic/utils/splitter.rb +84 -0
- data/lib/wwwjdic/version.rb +20 -0
- data/lib/wwwjdic.rb +57 -0
- data/test/test_helper.rb +40 -0
- data/test/test_wwwjdic.rb +32 -0
- data/test/wwwjdic/locales/de.yml +22 -0
- data/test/wwwjdic/locales/en.yml +22 -0
- data/test/wwwjdic/locales/es.yml +22 -0
- data/test/wwwjdic/locales/fr.yml +22 -0
- data/test/wwwjdic/locales/hu.yml +22 -0
- data/test/wwwjdic/locales/it.yml +21 -0
- data/test/wwwjdic/locales/ja.yml +23 -0
- data/test/wwwjdic/locales/nl.yml +22 -0
- data/test/wwwjdic/locales/ru.yml +22 -0
- data/test/wwwjdic/locales/sl.yml +22 -0
- data/test/wwwjdic/locales/sv.yml +22 -0
- data/test/wwwjdic/locales/test_locales.rb +65 -0
- data/test/wwwjdic/parsers/test_dict.rb +73 -0
- data/test/wwwjdic/parsers/test_display.rb +51 -0
- data/test/wwwjdic/parsers/test_key.rb +52 -0
- data/test/wwwjdic/parsers/test_server.rb +51 -0
- data/test/wwwjdic/test_application.rb +219 -0
- data/test/wwwjdic/test_parsable_duck_type.rb +37 -0
- data/test/wwwjdic/utils/test_downloader.rb +41 -0
- data/test/wwwjdic/utils/test_raisers.rb +59 -0
- data/wwwjdic.gemspec +74 -0
- metadata +309 -0
data/Gemfile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# wwwjdic
|
2
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
#
|
4
|
+
# This file is part of wwwjdic.
|
5
|
+
#
|
6
|
+
# wwwjdic is free software: you can redistribute it and/or modify it
|
7
|
+
# under the terms of the GNU General Public License as published by the
|
8
|
+
# Free Software Foundation, either version 3 of the License, or (at your
|
9
|
+
# option) any later version.
|
10
|
+
#
|
11
|
+
# wwwjdic is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
14
|
+
# for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
|
19
|
+
source 'https://rubygems.org'
|
20
|
+
|
21
|
+
gemspec
|
data/README.md
ADDED
@@ -0,0 +1,303 @@
|
|
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
|
+
# WWWJDic
|
23
|
+

|
24
|
+

|
25
|
+

|
26
|
+

|
27
|
+

|
28
|
+

|
29
|
+
|
30
|
+
Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
31
|
+
|
32
|
+
This file is part of wwwjdic.
|
33
|
+
|
34
|
+
wwwjdic is free software: you can redistribute it and/or modify it under
|
35
|
+
the terms of the GNU General Public License as published by the Free
|
36
|
+
Software Foundation, either version 3 of the License, or (at your
|
37
|
+
option) any later version.
|
38
|
+
|
39
|
+
wwwjdic is distributed in the hope that it will be useful, but WITHOUT
|
40
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
41
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
42
|
+
more details.
|
43
|
+
|
44
|
+
You should have received a copy of the GNU General Public License along
|
45
|
+
with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
46
|
+
|
47
|
+
## Description
|
48
|
+
This gem uses WWWJDic Backdoor Entry/API as described by
|
49
|
+
http://www.csse.monash.edu.au/~jwb/wwwjdicinf.html#backdoor_tag to
|
50
|
+
interact with WWWJDic and translate to and from Japanese language.
|
51
|
+
|
52
|
+
WWWJDic is an online Japanese translation server made by Jim Breen and
|
53
|
+
available at http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?1C .
|
54
|
+
|
55
|
+
GNU GPLv3 license; source code (not yet) available through anonymous
|
56
|
+
checkout: `hg clone http://hg.savannah.nongnu.org/hgweb/wwwjdic/` or
|
57
|
+
write me and I'll send it.
|
58
|
+
|
59
|
+
You can even decide to contribute to this little free software project
|
60
|
+
by registering to Savannah and ask to be part of the 'WWWJDic' project!
|
61
|
+
With contributions from: Jim Breen, 新部裕, Jon Maken.
|
62
|
+
|
63
|
+
## Documentation
|
64
|
+
WWWJDic tries to follow semantic versioning (see http://semver.org/).
|
65
|
+
There may be backward incompatible changes each time minor version
|
66
|
+
number changes, but that any tiny version number change should be bug
|
67
|
+
fixes and internal changes only. Be sure to read the CHANGELOG each time
|
68
|
+
we cut a new release and lock your gems accordingly.
|
69
|
+
|
70
|
+
RDoc documentation available in the html folder.
|
71
|
+
|
72
|
+
### Installing WWWJDic
|
73
|
+
RubyGems is the preferred easy install method for WWWJDic. WWWJDic is
|
74
|
+
intended to be installed via the
|
75
|
+
[RubyGems](http://rubyforge.org/projects/rubygems/) system. To get the
|
76
|
+
latest version, simply enter the following into your command prompt:
|
77
|
+
`gem install wwwjdic`.
|
78
|
+
|
79
|
+
### Supported Ruby Versions and Implementations
|
80
|
+
Because WWWJDic is pure Ruby, it should run pretty much anywhere,
|
81
|
+
including Rubinius, JRuby, MacRuby, etc. Officially the support is for
|
82
|
+
2.x MRI.
|
83
|
+
|
84
|
+
### Support
|
85
|
+
The easiest way to get help with WWWJDic is to post a message to the
|
86
|
+
mailing list: `http://lists.nongnu.org/mailman/listinfo/wwwjdic-users`
|
87
|
+
|
88
|
+
Feel free to post any question there, developers are responsive and will
|
89
|
+
be happy to help you figure out how to use WWWJDic, or help you
|
90
|
+
determine whether it's the right tool for the task you are working on.
|
91
|
+
|
92
|
+
Please make your posts to the list as specific as possible, including
|
93
|
+
code samples and output where relevant. Do not post any information that
|
94
|
+
should not be shared publicly, and be sure to reduce your example code
|
95
|
+
as much as possible so that those who are responding to your question
|
96
|
+
can more easily see what the issue might be.
|
97
|
+
|
98
|
+
### Contributing
|
99
|
+
If you've found a bug, want to submit a patch, or have a feature
|
100
|
+
request, please enter a ticket into our bug tracker:
|
101
|
+
`https://savannah.nongnu.org/bugs/?func=additem&group=wwwjdic`
|
102
|
+
|
103
|
+
We strongly encourage bug reports to come with failing tests or at least
|
104
|
+
a reduced example that demonstrates the problem.
|
105
|
+
|
106
|
+
Similarly, patches should include tests, API documentation, and an
|
107
|
+
update to the manual where relevant. Feel free to clone early though and
|
108
|
+
participate in the project, if you just want some feedback or a code
|
109
|
+
review before preparing your code to be merged.
|
110
|
+
|
111
|
+
If you are unsure about whether or not you've found a bug, or want to
|
112
|
+
check to see whether we'd be interested in the feature you want to add
|
113
|
+
before you start working on it, feel free to post to our mailing list.
|
114
|
+
|
115
|
+
### License
|
116
|
+
WWWJDic is released under GNU GPL v3 license: if you wish to contribute
|
117
|
+
to WWWJDic, you will retain your own copyright but must agree to license
|
118
|
+
your code under the same terms as the project itself (or any compatible
|
119
|
+
license according to [GPL Compatible
|
120
|
+
Licenses](http://www.gnu.org/licenses/license-list.en.html#GPLCompatibleLicenses)).
|
121
|
+
|
122
|
+
### Links
|
123
|
+
|
124
|
+
#### Savannah
|
125
|
+
* Project page: https://savannah.nongnu.org/projects/wwwjdic/
|
126
|
+
* Source code (Mercurial) repository: http://hg.savannah.gnu.org/hgweb/wwwjdic/
|
127
|
+
* Known Bugs: https://savannah.nongnu.org/bugs/?group=wwwjdic
|
128
|
+
* Users Mailing List: https://savannah.nongnu.org/mail/?group=wwwjdic
|
129
|
+
* News: https://savannah.nongnu.org/news/?group=wwwjdic
|
130
|
+
|
131
|
+
#### RubyGems
|
132
|
+
* Gem page: https://rubygems.org/gems/wwwjdic
|
133
|
+
* Online RDoc: http://rubydoc.info/gems/wwwjdic/
|
134
|
+
* Gem updates Atom Feed: https://rubygems.org/gems/wwwjdic/versions.atom
|
135
|
+
|
136
|
+
#### Other links
|
137
|
+
* WWWJDic: http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?1C .
|
138
|
+
* Jim Breen's Japanese Page: http://nihongo.monash.edu/japanese.html#links_software
|
139
|
+
* "An HTTP/HTTPS/FTP file downloader library/CLI based upon
|
140
|
+
MiniPortile's HTTP implementation." gist by Jon Maken:
|
141
|
+
https://gist.github.com/jonforums/2202048.
|
142
|
+
|
143
|
+
### Usage Examples
|
144
|
+
See `examples` folder. To run the examples just run
|
145
|
+
`ruby examples/`{EXAMPLE_NAME}`.rb`. Running the examples you'll see
|
146
|
+
both the example description and correct code usage to perform such
|
147
|
+
action. Here below are listed the currently available examples:
|
148
|
+
|
149
|
+
* The `basics.rb` example (run `ruby examples/basics.rb`) shows how to
|
150
|
+
initialize and use a WWWJDic object through the `breener` factory
|
151
|
+
method;
|
152
|
+
* The `uri.rb` example (run `ruby examples/uri.rb`) shows how to ask for
|
153
|
+
translation URI at WWWJDic, with all available options and
|
154
|
+
configurations.
|
155
|
+
* The `translate.rb` example (run `ruby examples/translate.rb`) shows
|
156
|
+
how to ask for an actual translation through WWWJDic Backdoor/API,
|
157
|
+
with all available options and configurations. It will also show how
|
158
|
+
to download such translation;
|
159
|
+
|
160
|
+
Using this API is pretty simple. First, get a reference to the WWWJDic
|
161
|
+
object, through its factory method with
|
162
|
+
|
163
|
+
my_wwwjdic = WWWJDic::breener
|
164
|
+
|
165
|
+
This will save a WWWJDic instance in your `my_wwwjdic` object.
|
166
|
+
|
167
|
+
#### Parameters
|
168
|
+
You can then start possibly manipulating some basic parameters that can
|
169
|
+
be set and read from the API. These are not mandatory settings, but are
|
170
|
+
useful whether you'll use your `my_wwwjdic` object for further similar
|
171
|
+
requests: settings these values internally will save you type more
|
172
|
+
parameters in the request, leaving only the word to search/translate as
|
173
|
+
needed.
|
174
|
+
|
175
|
+
* the `server` name/URL to use:
|
176
|
+
|
177
|
+
my_wwwjdic.server # returns the default server URL http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?
|
178
|
+
my_wwwjdic.to_s # contains the URL above
|
179
|
+
|
180
|
+
# this below is (again) the default configured server
|
181
|
+
my_wwwjdic.server = :edrdg
|
182
|
+
my_wwwjdic.server # returns the URL http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?
|
183
|
+
my_wwwjdic.to_s # contains the URL above
|
184
|
+
|
185
|
+
# this is the additional server
|
186
|
+
my_wwwjdic.server = :monash
|
187
|
+
my_wwwjdic.server # returns the URL http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?
|
188
|
+
my_wwwjdic.to_s # contains the URL above
|
189
|
+
* the default reference `dictionary` to use for translations. All
|
190
|
+
currently available dictionaries strings can be used: `'1'`, `'2'`,
|
191
|
+
`'3'`, `'4'`, `'5'`, `'6'`, `'7'`, `'8'`, `'9'`, `'A'`, `'B'`, `'C'`,
|
192
|
+
`'D'`, `'E'`, `'F'`, `'G'`, `'H'`, `'I'`, `'J'`, `'K'`, `'L'`, `'M'`,
|
193
|
+
`'N'`, `'O'`, `'P'`, `'Q'` and `'R'`.
|
194
|
+
You can even use the whole (exact) dictionary strings as listed in the
|
195
|
+
WWWJDic HTML source code: `'Jpn-Eng General (EDICT)'`,
|
196
|
+
`'Japanese Names (ENAMDICT)'`, `'Computing/Telecomms'`,
|
197
|
+
`'Life Sciences/Bio-Med'`, `'Legal Terms'`, `'Finance/Marketing'`,
|
198
|
+
`'Buddhism'`, `'Miscellaneous'`, `'Special Text-glossing'`,
|
199
|
+
`'Engineering/Science'`, `'Linguistics'`, `'River & Water Systems'`,
|
200
|
+
`'Automobile Industry'`, `'Japanese Wordnet'`,
|
201
|
+
`'Work-in-progress File'`, `'Japanese-German (WaDoku)'`,
|
202
|
+
`'Japanese-French'`, `'Japanese-Russian'`, `'Japanese-Swedish'`,
|
203
|
+
`'Japanese-Hungarian'`, `'Japanese-Spanish'`, `'Japanese-Dutch'`,
|
204
|
+
`'Japanese-Slovenian'`, `'Japanese-Italian'`, `'Untranslated'`,
|
205
|
+
`'Combined Jpn-Eng'`, `'Expanded Text-glossing'`.
|
206
|
+
|
207
|
+
my_wwwjdic.dictionary # returns 0 as default, if not set
|
208
|
+
|
209
|
+
my_wwwjdic.dictionary = '7'
|
210
|
+
my_wwwjdic.dictionary # returns the string '7'
|
211
|
+
* Then you can obviously ask for a translation reference URL. Basic
|
212
|
+
examples:
|
213
|
+
|
214
|
+
my_wwwjdic.uri 'word' # this return the URL for translation of 'word', with normal display format
|
215
|
+
|
216
|
+
my_wwwjdic.raw_uri 'word' # this return the URL for translation of 'word', with raw display format
|
217
|
+
|
218
|
+
my_wwwjdic.json_uri 'word' # this return the URL for translation of 'word', returning a JSON data as { 'word': 'url' } with normal display format
|
219
|
+
* Then, instead of the pure URL to reference the WWWJDic site, you can
|
220
|
+
retrieve the actual translation itself or save it to a file:
|
221
|
+
|
222
|
+
my_wwwjdic.translate 'word' # returns a string containing the web page content of the raw display format
|
223
|
+
|
224
|
+
my_wwwjdic.translate 'word', nil, filename # regardless the nil (see it later) the third parameter is the filename where to save the retrieved translation
|
225
|
+
* Another possible result for translation is to get it in JSON format
|
226
|
+
also with the possibility to save it in a file.
|
227
|
+
|
228
|
+
my_wwwjdic.json_translate 'word' # returns the JSON format of the translation.
|
229
|
+
|
230
|
+
For this, the resulting JSON format will be:
|
231
|
+
|
232
|
+
{
|
233
|
+
word : translation uri for raw display format
|
234
|
+
'title' : title (extracted from <br>TITLE<br> tags in raw display format)
|
235
|
+
'translation' : translation content (extracted from <pre>TRANSLATION</pre> raw display format
|
236
|
+
'message' : possible error message or result (extracted from <p>MESSAGE\n raw display format
|
237
|
+
}
|
238
|
+
|
239
|
+
* Now let's come to the second parameter of the methods above (set to
|
240
|
+
`nil` in the examples), the arguments for the translation. The default
|
241
|
+
is to translate to/from English/Japanese with normal display layout
|
242
|
+
and no other specificities, except that the API automatically
|
243
|
+
identifies Japanese or English and manages the romaji and so on. The
|
244
|
+
returned URL is the default EDR&DG one. What if the user wants to
|
245
|
+
customize something? The `args`, second parameter of all those methods
|
246
|
+
above, is a dictionary (hash map) that allows to specify which
|
247
|
+
parameters and to which values they shall be set.
|
248
|
+
|
249
|
+
Valid parameters, and their values are:
|
250
|
+
|
251
|
+
* `dict` parameter allows both numbers and (exact) strings to select
|
252
|
+
dictionaries: `'1'`, `'2'`, `'3'`, `'4'`, `'5'`, `'6'`, `'7'`,
|
253
|
+
`'8'`, `'9'`, `'A'`, `'B'`, `'C'`, `'D'`, `'E'`, `'F'`, `'G'`,
|
254
|
+
`'H'`, `'I'`, `'J'`, `'K'`, `'L'`, `'M'`, `'N'`, `'O'`, `'P'`,
|
255
|
+
`'Q'`, and `'R'`, together with the full (exact) strings
|
256
|
+
`'Jpn-Eng General (EDICT)'`, `'Japanese Names (ENAMDICT)'`,
|
257
|
+
`'Computing/Telecomms'`, `'Life Sciences/Bio-Med'`,
|
258
|
+
`'Legal Terms'`, `'Finance/Marketing'`, `'Buddhism'`,
|
259
|
+
`'Miscellaneous'`, `'Special Text-glossing'`,
|
260
|
+
`'Engineering/Science'`, `'Linguistics'`,
|
261
|
+
`'River & Water Systems'`, `'Automobile Industry'`,
|
262
|
+
`'Japanese Wordnet'`, `'Work-in-progress File'`,
|
263
|
+
`'Japanese-German (WaDoku)'`, `'Japanese-French'`,
|
264
|
+
`'Japanese-Russian'`, `'Japanese-Swedish'`,
|
265
|
+
`'Japanese-Hungarian'`, `'Japanese-Spanish'`, `'Japanese-Dutch'`,
|
266
|
+
`'Japanese-Slovenian'`, `'Japanese-Italian'`, `'Untranslated'`,
|
267
|
+
`'Combined Jpn-Eng'` and `'Expanded Text-glossing'`.
|
268
|
+
* `display` parameter to select the final format of the referred
|
269
|
+
HTML page (either regular HTML or raw): `:regular`, `:raw`.
|
270
|
+
* `server` allows the user to select from the default URL (at
|
271
|
+
Electronic Dictionaries R&D Group) or the Monash university URL:
|
272
|
+
`:edrdg`, `:monash`.
|
273
|
+
|
274
|
+
Some examples of these parameters' usage:
|
275
|
+
|
276
|
+
my_wwwjdic.translate 'sprache', dict: 'F' # this translates using the 'F' dictionary, that is the German one
|
277
|
+
|
278
|
+
my_wwwjdic.uri 'sprache', dict: 'F' # same as above, but returns the translation URL, instead
|
279
|
+
|
280
|
+
my_wwwjdic.raw_uri 'sprache', dict: 'F' # same as above, but returns the translation URL with raw display, instead
|
281
|
+
|
282
|
+
my_wwwjdic.uri 'sprache', dict: 'F', display: raw # same as above
|
283
|
+
|
284
|
+
------------------------------------------
|
285
|
+
|
286
|
+
wwwjdic
|
287
|
+
|
288
|
+
Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
289
|
+
|
290
|
+
This file is part of wwwjdic.
|
291
|
+
|
292
|
+
wwwjdic is free software: you can redistribute it and/or modify it under
|
293
|
+
the terms of the GNU General Public License as published by the Free
|
294
|
+
Software Foundation, either version 3 of the License, or (at your
|
295
|
+
option) any later version.
|
296
|
+
|
297
|
+
wwwjdic is distributed in the hope that it will be useful, but WITHOUT
|
298
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
299
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
300
|
+
more details.
|
301
|
+
|
302
|
+
You should have received a copy of the GNU General Public License along
|
303
|
+
with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
data/Rakefile
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# wwwjdic
|
2
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
#
|
4
|
+
# This file is part of wwwjdic.
|
5
|
+
#
|
6
|
+
# wwwjdic is free software: you can redistribute it and/or modify it
|
7
|
+
# under the terms of the GNU General Public License as published by the
|
8
|
+
# Free Software Foundation, either version 3 of the License, or (at your
|
9
|
+
# option) any later version.
|
10
|
+
#
|
11
|
+
# wwwjdic is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
14
|
+
# for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
|
19
|
+
require 'rake'
|
20
|
+
require 'rake/clean'
|
21
|
+
require 'rake/testtask'
|
22
|
+
require 'rdoc/task'
|
23
|
+
require 'rubygems/package_task'
|
24
|
+
|
25
|
+
wwwjdic = Gem::Specification.load 'wwwjdic.gemspec'
|
26
|
+
|
27
|
+
desc "Build the gem (Task 'rake package')"
|
28
|
+
Rake::PackageTask.new wwwjdic do |package|
|
29
|
+
package.name = wwwjdic.name
|
30
|
+
package.need_tar = true
|
31
|
+
package.need_tar_bz2 = true
|
32
|
+
package.need_tar_gz = true
|
33
|
+
package.need_zip = true
|
34
|
+
package.package_files = wwwjdic.files
|
35
|
+
package.version = wwwjdic.version
|
36
|
+
end
|
37
|
+
|
38
|
+
desc "Build the RDoc gem documentation (task 'rake rdoc')"
|
39
|
+
Rake::RDocTask.new do |rdoc|
|
40
|
+
rdoc.rdoc_files.add wwwjdic.files
|
41
|
+
rdoc.title = wwwjdic.name + ' ' + wwwjdic.version.to_s
|
42
|
+
rdoc.main = 'README.md'
|
43
|
+
rdoc.options += %w(-e UTF-8 --hyperlink-all --line-numbers)
|
44
|
+
end
|
45
|
+
|
46
|
+
desc "Run the gem unit tests (task 'rake test')"
|
47
|
+
Rake::TestTask.new do |test_task|
|
48
|
+
test_task.libs << 'test'
|
49
|
+
test_task.test_files = FileList['test/**/test_*.rb']
|
50
|
+
test_task.verbose = true
|
51
|
+
test_task.warning = true
|
52
|
+
end
|
data/acknowledgements.md
ADDED
@@ -0,0 +1,55 @@
|
|
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
|
+
# Acknowledgements
|
23
|
+
FSIJ理事会の理事長、新部裕さんの日本語の翻訳。 Japanese translation by
|
24
|
+
Yutaka Niibe, President of Free Software Initiative of Japan.
|
25
|
+
|
26
|
+
Thanks to Łukasz Niemier for his suggestions on possible improvements.
|
27
|
+
|
28
|
+
## An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile's HTTP implementation.
|
29
|
+
[An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile's
|
30
|
+
HTTP implementation.](https://gist.github.com/jonforums/2202048) gist by
|
31
|
+
Jon Maken. About *An HTTP/HTTPS/FTP file downloader library/CLI based
|
32
|
+
upon MiniPortile's HTTP implementation*, please note that "License:
|
33
|
+
3-clause BSD". This license is GNU GPLv3 compatible according to
|
34
|
+
<http://www.gnu.org/licenses/license-list.en.html#ModifiedBSD>.
|
35
|
+
|
36
|
+
------------------------------------------
|
37
|
+
|
38
|
+
wwwjdic
|
39
|
+
|
40
|
+
Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
41
|
+
|
42
|
+
This file is part of wwwjdic.
|
43
|
+
|
44
|
+
wwwjdic is free software: you can redistribute it and/or modify it under
|
45
|
+
the terms of the GNU General Public License as published by the Free
|
46
|
+
Software Foundation, either version 3 of the License, or (at your
|
47
|
+
option) any later version.
|
48
|
+
|
49
|
+
wwwjdic is distributed in the hope that it will be useful, but WITHOUT
|
50
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
51
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
52
|
+
more details.
|
53
|
+
|
54
|
+
You should have received a copy of the GNU General Public License along
|
55
|
+
with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
data/authors.md
ADDED
@@ -0,0 +1,67 @@
|
|
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
|
+
# Project and gem owned by
|
23
|
+
* *Author*: [Marco Bresciani](mailto:marcobresciani_1974@libero.it)
|
24
|
+
|
25
|
+
# Authors list (in appearing order)
|
26
|
+
* *Author*: [Marco Bresciani](mailto:marcobresciani_1974@libero.it)
|
27
|
+
* *Contributor*: [Jim
|
28
|
+
Breen](http://www.csse.monash.edu.au/~jwb/index.html)
|
29
|
+
* *Author*: [Jon Maken](mailto:jon.forums@gmail.com), [An HTTP/HTTPS/FTP
|
30
|
+
file downloader library/CLI based upon MiniPortile's HTTP
|
31
|
+
implementation.](https://gist.github.com/jonforums/2202048)
|
32
|
+
|
33
|
+
## Translations Authors (in appearing order)
|
34
|
+
* *Italiano*: [Marco Bresciani](mailto:marcobresciani_1974@libero.it)
|
35
|
+
* *English*: [Marco Bresciani](mailto:marcobresciani_1974@libero.it)
|
36
|
+
* *日本語*: [新部裕](mailto:gniibe@fsij.org)
|
37
|
+
* *Russian*: Google Translate
|
38
|
+
* *German*: Google Translate
|
39
|
+
* *Spanish*: Google Translate
|
40
|
+
* *French*: Google Translate
|
41
|
+
* *Hungarian*: Google Translate
|
42
|
+
* *Dutch*: Google Translate
|
43
|
+
* *Slovenian*: Google Translate
|
44
|
+
* *Swedish*: Google Translate
|
45
|
+
|
46
|
+
No one else, yet.
|
47
|
+
|
48
|
+
------------------------------------------
|
49
|
+
|
50
|
+
wwwjdic
|
51
|
+
|
52
|
+
Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
53
|
+
|
54
|
+
This file is part of wwwjdic.
|
55
|
+
|
56
|
+
wwwjdic is free software: you can redistribute it and/or modify it under
|
57
|
+
the terms of the GNU General Public License as published by the Free
|
58
|
+
Software Foundation, either version 3 of the License, or (at your
|
59
|
+
option) any later version.
|
60
|
+
|
61
|
+
wwwjdic is distributed in the hope that it will be useful, but WITHOUT
|
62
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
63
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
64
|
+
more details.
|
65
|
+
|
66
|
+
You should have received a copy of the GNU General Public License along
|
67
|
+
with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|