wwwjdic 13.0.1 → 16.1.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 (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +60 -1
  3. data/Gemfile +7 -1
  4. data/README.md +500 -225
  5. data/Rakefile +10 -3
  6. data/copyright.md +17 -29
  7. data/examples/basics.rb +53 -45
  8. data/examples/translate.rb +159 -86
  9. data/examples/uri.rb +46 -78
  10. data/html/CHANGELOG.html +90 -35
  11. data/html/COPYING_md.html +26 -38
  12. data/html/Gemfile.html +25 -35
  13. data/html/Object.html +838 -74
  14. data/html/README_md.html +322 -175
  15. data/html/Rakefile.html +28 -38
  16. data/html/WWWJDic.html +63 -104
  17. data/html/WWWJDic/ParsableDuckType.html +38 -58
  18. data/html/WWWJDic/Parser.html +52 -92
  19. data/html/WWWJDic/Parsers.html +29 -35
  20. data/html/WWWJDic/Parsers/Dict.html +50 -76
  21. data/html/WWWJDic/Parsers/Display.html +45 -69
  22. data/html/WWWJDic/Parsers/Key.html +46 -70
  23. data/html/WWWJDic/Parsers/Search.html +41 -61
  24. data/html/WWWJDic/Parsers/Server.html +45 -69
  25. data/html/WWWJDic/Splitter.html +81 -175
  26. data/html/WWWJDic/Utils.html +30 -36
  27. data/html/WWWJDic/Utils/Downloader.html +41 -41
  28. data/html/WWWJDic/Utils/Downloader/Downloader.html +65 -92
  29. data/html/WWWJDic/Utils/Raisers.html +46 -98
  30. data/html/WWWJDic/WWWJDic.html +166 -348
  31. data/html/copyright_md.html +219 -239
  32. data/html/created.rid +33 -58
  33. data/html/css/rdoc.css +638 -590
  34. data/html/index.html +313 -182
  35. data/html/js/darkfish.js +84 -161
  36. data/html/js/navigation.js +4 -40
  37. data/html/js/navigation.js.gz +0 -0
  38. data/html/js/search.js +109 -109
  39. data/html/js/search_index.js +1 -1
  40. data/html/js/search_index.js.gz +0 -0
  41. data/html/js/searcher.js +228 -229
  42. data/html/js/searcher.js.gz +0 -0
  43. data/html/table_of_contents.html +161 -200
  44. data/lib/wwwjdic.rb +14 -15
  45. data/lib/wwwjdic/application.rb +68 -36
  46. data/lib/wwwjdic/constants.rb +56 -12
  47. data/lib/wwwjdic/locales/de.yml +9 -4
  48. data/lib/wwwjdic/locales/en.yml +9 -4
  49. data/lib/wwwjdic/locales/es.yml +9 -4
  50. data/lib/wwwjdic/locales/fr.yml +9 -4
  51. data/lib/wwwjdic/locales/hu.yml +9 -4
  52. data/lib/wwwjdic/locales/it.yml +9 -4
  53. data/lib/wwwjdic/locales/ja.yml +11 -5
  54. data/lib/wwwjdic/locales/nl.yml +9 -4
  55. data/lib/wwwjdic/locales/ru.yml +9 -4
  56. data/lib/wwwjdic/locales/sl.yml +9 -4
  57. data/lib/wwwjdic/locales/sv.yml +9 -4
  58. data/lib/wwwjdic/parser.rb +13 -8
  59. data/lib/wwwjdic/parsers/dict.rb +11 -8
  60. data/lib/wwwjdic/parsers/display.rb +8 -3
  61. data/lib/wwwjdic/parsers/key.rb +9 -3
  62. data/lib/wwwjdic/parsers/search.rb +10 -3
  63. data/lib/wwwjdic/parsers/server.rb +8 -3
  64. data/lib/wwwjdic/utils/downloader.rb +37 -34
  65. data/lib/wwwjdic/utils/raisers.rb +12 -15
  66. data/lib/wwwjdic/utils/splitter.rb +32 -18
  67. data/lib/wwwjdic/version.rb +22 -8
  68. data/test/test_helper.rb +10 -1
  69. data/test/test_wwwjdic.rb +10 -4
  70. data/test/wwwjdic/locales/de.yml +9 -1
  71. data/test/wwwjdic/locales/en.yml +9 -1
  72. data/test/wwwjdic/locales/es.yml +9 -1
  73. data/test/wwwjdic/locales/fr.yml +9 -1
  74. data/test/wwwjdic/locales/hu.yml +9 -1
  75. data/test/wwwjdic/locales/it.yml +10 -1
  76. data/test/wwwjdic/locales/ja.yml +11 -2
  77. data/test/wwwjdic/locales/nl.yml +9 -1
  78. data/test/wwwjdic/locales/ru.yml +9 -1
  79. data/test/wwwjdic/locales/sl.yml +9 -1
  80. data/test/wwwjdic/locales/sv.yml +9 -1
  81. data/test/wwwjdic/locales/test_locales.rb +41 -24
  82. data/test/wwwjdic/parsers/test_dict.rb +65 -37
  83. data/test/wwwjdic/parsers/test_display.rb +11 -5
  84. data/test/wwwjdic/parsers/test_key.rb +10 -4
  85. data/test/wwwjdic/parsers/test_server.rb +11 -5
  86. data/test/wwwjdic/test_application.rb +199 -149
  87. data/test/wwwjdic/test_parsable_duck_type.rb +9 -5
  88. data/test/wwwjdic/utils/test_downloader.rb +7 -1
  89. data/test/wwwjdic/utils/test_raisers.rb +46 -29
  90. data/wwwjdic.gemspec +44 -26
  91. metadata +55 -43
  92. data/acknowledgements.md +0 -55
  93. data/authors.md +0 -67
  94. data/html/acknowledgements_md.html +0 -149
  95. data/html/authors_md.html +0 -181
  96. data/html/js/jquery.js +0 -4
  97. data/html/wwwjdic_gemspec.html +0 -161
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a217047ce593d3dff8af95b44ff097a1eeccf79c22ec9d6988e79f5c71a8fd4e
4
- data.tar.gz: 8014a3bbe2a7096c68f1ddcf447a7c088c814c3cbc7bb4c24ede5a3c3580b9f9
3
+ metadata.gz: bb2e2cd3df5eea6d22b22252319b67ff022dadc110bc1e9f775dbdd9dff82b2b
4
+ data.tar.gz: b9269c65ef7d397c4c31eb3fa4d5e762c8147fe14d50b68ae02204d8559f61ae
5
5
  SHA512:
6
- metadata.gz: e54d268bec4b9154c64b44d4d320fc1cc89c8136d1c056a3da40c0eeb5c6296898936edc6ff1965b44499a05f34af65fac359d6b60d01385a67233215d7b9239
7
- data.tar.gz: 6920bca45087e47ccee89d0c329a7af58ee6ac4dcd35631159c3fea854bb1b889f3509cb25247a6b844fd070e0c2b4a8beb8b7cda4ee458067f64b192972d21b
6
+ metadata.gz: 44ebe05d1250ebef33b777358efc23bd78eb72eb62ad53c5e167c5f2478c285eee048a69865b0d5f120757e079cc95c7baeb163787a251a621bd84758f411105
7
+ data.tar.gz: 271996b80d2650cd7f52d3e7384b4ef2905430eb2f81eaeb49e783fd2dc1cce637634578291f4d42a6b24b4e3e79a321a11dd45daac4f920a05460242df10a59
data/CHANGELOG CHANGED
@@ -1,3 +1,62 @@
1
+ = Version 16.1.0
2
+ * PATCH update gem dependencies.
3
+ * PATCH fix somw Rubocop offenses
4
+ * IN PROGRESS: improving application RDoc to better comply with SemVer
5
+ point 1 (Software using Semantic Versioning MUST declare a public
6
+ API. This API could be declared in the code itself or exist strictly
7
+ in documentation. However it is done, it should be precise and
8
+ comprehensive.)
9
+
10
+ = Version 16.0.0
11
+ * MAJOR update from Ruby '~> 2.7' to Ruby '~> 3.0'.
12
+ * MINOR update IntelliJ IDEA (RubyGem) project configuration.
13
+ * PATCH update gem dependencies.
14
+ * IN PROGRESS: restoring key configuration as allowed parameter, to
15
+ allow user asking for specific searches. Search key currently fixed
16
+ to 'E' (exact match) type search.
17
+ * IN PROGRESS: improving application RDoc to better comply with SemVer
18
+ point 1 (Software using Semantic Versioning MUST declare a public
19
+ API. This API could be declared in the code itself or exist strictly
20
+ in documentation. However it is done, it should be precise and
21
+ comprehensive.)
22
+
23
+ = Version 15.0.0
24
+ * MAJOR changed key search type default from "exact" to "english".
25
+ * MAJOR changed Monash dictionary server reference URL.
26
+ * MINOR introduce compliance to REUSE tool from FSF Europe
27
+ * MINOR add dependency to Rubocop
28
+ * PATCH update copyright notices
29
+ * PATCH remove test data form I18N files.
30
+ * PATCH update gem dependencies.
31
+ * PATCH update IntelliJ IDEA (RubyGem) project configuration.
32
+ * PATCH update to Ruby 2.7.x new things
33
+ * IN PROGRESS: restoring key configuration as allowed parameter, to
34
+ allow user asking for specific searches. Search key currently fixed
35
+ to 'E' (exact match) type search.
36
+ * IN PROGRESS: improving application RDoc to better comply with SemVer
37
+ point 1 (Software using Semantic Versioning MUST declare a public
38
+ API. This API could be declared in the code itself or exist strictly
39
+ in documentation. However it is done, it should be precise and
40
+ comprehensive.)
41
+
42
+ = Version 14.0.0
43
+ * MAJOR update from Ruby '~> 2.6' to Ruby '~> 2.7'.
44
+ * MINOR update IntelliJ IDEA (RubyGem) project configuration.
45
+ * MINOR add simplecov code coverage.
46
+ * PATCH update gem dependencies.
47
+ * PATCH change all asserts to matchers
48
+ * PATCH update copyright notice
49
+ * PATCH Fix deprecated methods calls for Minitest version 6.
50
+ * IN PROGRESS: translation example.
51
+ * IN PROGRESS: restoring key configuration as allowed parameter, to
52
+ allow user asking for specific searches. Search key currently fixed
53
+ to 'Q' (exact match) type search.
54
+ * IN PROGRESS: improving application RDoc to better comply with SemVer
55
+ point 1 (Software using Semantic Versioning MUST declare a public
56
+ API. This API could be declared in the code itself or exist strictly
57
+ in documentation. However it is done, it should be precise and
58
+ comprehensive.)
59
+
1
60
  = Version 13.0.1
2
61
  * PATCH updating gem dependencies.
3
62
  * IN PROGRESS: translation example.
@@ -413,7 +472,7 @@
413
472
 
414
473
  wwwjdic
415
474
 
416
- Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
475
+ © 2014-2021 Marco Bresciani
417
476
 
418
477
  This file is part of wwwjdic.
419
478
 
data/Gemfile CHANGED
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # wwwjdic
2
- # Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
4
+ # © 2014-2021 Marco Bresciani
3
5
  #
4
6
  # This file is part of wwwjdic.
5
7
  #
@@ -15,6 +17,10 @@
15
17
  #
16
18
  # You should have received a copy of the GNU General Public License
17
19
  # along with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
20
+ #
21
+ # SPDX-FileCopyrightText: 2014-2021 Marco Bresciani
22
+ #
23
+ # SPDX-<span></span>License-Identifier: FSFAP
18
24
 
19
25
  source 'https://rubygems.org'
20
26
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  wwwjdic
3
3
 
4
- Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
4
+ © 2014-2021 Marco Bresciani
5
5
 
6
6
  This file is part of wwwjdic.
7
7
 
@@ -17,275 +17,550 @@ more details.
17
17
 
18
18
  You should have received a copy of the GNU General Public License along
19
19
  with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
20
- -->
21
20
 
21
+ SPDX-FileCopyrightText: 2014-2021 Marco Bresciani
22
+
23
+ SPDX-License-Identifier: GFDL-1.3-or-later
24
+ -->
22
25
  # WWWJDic
23
- ![Gem](https://img.shields.io/gem/v/wwwjdic.svg?style=plastic)
24
- ![Gem](https://img.shields.io/gem/dt/wwwjdic.svg?style=plastic)
25
- ![Gem](https://img.shields.io/gem/dtv/wwwjdic.svg?style=plastic)
26
- ![Gem download rank](https://img.shields.io/gem/rt/wwwjdic.svg?style=plastic)
27
- ![Gem download rank (daily)](https://img.shields.io/gem/rd/wwwjdic.svg?style=plastic)
28
- ![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/rubygems/wwwjdic.svg?style=plastic)
26
+ ![name](https://badgen.net/rubygems/n/wwwjdic)
27
+ ![version (latest)](https://badgen.net/rubygems/v/wwwjdic/latest)
28
+ ![platform](https://badgen.net/rubygems/p/wwwjdic)
29
29
 
30
- Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
30
+ [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=plastic)](https://github.com/RichardLitt/standard-readme)
31
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop)
32
+ [![REUSE status](https://api.reuse.software/badge/git.fsfe.org/reuse/api)](https://api.reuse.software/info/git.fsfe.org/reuse/api)
31
33
 
32
- This file is part of wwwjdic.
34
+ ![total downloads](https://badgen.net/rubygems/dt/wwwjdic)
35
+ ![latest version downloads](https://badgen.net/rubygems/dv/wwwjdic)
33
36
 
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.
37
+ ![Gem download rank](https://img.shields.io/gem/rt/wwwjdic.svg?style=plastic)
38
+ ![Gem download rank (daily)](https://img.shields.io/gem/rd/wwwjdic.svg?style=plastic)
39
+ ![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/rubygems/wwwjdic.svg?style=plastic)
40
+ ![Gems](https://img.shields.io/gem/u/MarcoBresciani?style=plastic)
38
41
 
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.
42
+ ![Security Headers](https://img.shields.io/security-headers?style=plastic&url=https%3A%2F%2Fsavannah.nongnu.org%2Fprojects%2Faamfp)
43
+ ![Chromium HSTS preload](https://img.shields.io/hsts/preload/savannah.nongnu.org?style=plastic)
44
+ ![Mozilla HTTP Observatory Grade](https://img.shields.io/mozilla-observatory/grade/savannah.nongnu.org?publish&style=plastic)
45
+ ![Website](https://img.shields.io/website?style=plastic&url=https%3A%2F%2Fsavannah.nongnu.org%2Fprojects%2Faamfp)
43
46
 
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/>.
47
+ This gem uses WWWJDic Backdoor Entry/API to interact with WWWJDic and
48
+ translate to and from Japanese language.
46
49
 
47
- ## Description
48
50
  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
-
51
+ http://www.edrdg.org/wwwjdic/wwwjdicinf.html#backdoor_tag to interact
52
+ with WWWJDic and translate to and from Japanese language.
52
53
  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
-
54
+ available at http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?1C.
55
+ GNU GPLv3 license; source code available through anonymous checkout:
56
+ `hg clone http://hg.savannah.nongnu.org/hgweb/wwwjdic/` or write me, and
57
+ I'll send it.
59
58
  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.
59
+ by registering to Savannah and ask to be part of the `wwwjdic` project!
60
+
61
+ ## Table of Contents
62
+ * [Background](#background)
63
+ * [Install](#install)
64
+ * [Savannah](#savannah)
65
+ * [RubyGems](#rubygems)
66
+ * [Usage](#usage)
67
+ * [Maintainers](#maintainers)
68
+ * [Thanks](#thanks)
69
+ * [Contributing](#contributing)
70
+ * [License](#license)
71
+
72
+ ## Background
73
+ This gem uses WWWJDic Backdoor Entry/API as described by
74
+ http://www.edrdg.org/wwwjdic/wwwjdicinf.html#backdoor_tag to interact
75
+ with WWWJDic and translate to and from Japanese language.
91
76
 
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.
77
+ WWWJDic is an online Japanese translation server made by Jim Breen and
78
+ available at http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?1C.
97
79
 
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`
80
+ Jim Breen's Japanese Page lists this gem:
81
+ http://nihongo.monash.edu/japanese.html#links_software and has allowed
82
+ the use of the same name.
102
83
 
103
- We strongly encourage bug reports to come with failing tests or at least
104
- a reduced example that demonstrates the problem.
84
+ GNU GPLv3 license; source code available through anonymous checkout:
85
+ `hg clone http://hg.savannah.nongnu.org/hgweb/wwwjdic/` or write me, and
86
+ I'll send it.
105
87
 
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.
88
+ You can even decide to contribute to this little free software project
89
+ by registering to Savannah and ask to be part of the `wwwjdic` project!
110
90
 
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.
91
+ With great contributions from: Jim Breen, 新部裕, Jon Maken.
114
92
 
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)).
93
+ ## Install
94
+ RubyGems is the preferred easy install method for WWWJDic.
95
+ WWWJDic should be installed via the
96
+ [RubyGems](http://rubyforge.org/projects/rubygems/) system.
97
+ To get the latest version, simply enter the following into your command
98
+ prompt: `gem install wwwjdic`.
121
99
 
122
- ### Links
100
+ Because WWWJDic is pure Ruby, it should run pretty much anywhere,
101
+ including Rubinius, JRuby, MacRuby, etc.
102
+ Officially the support is for \>= 3.0 MJIT.
123
103
 
124
104
  #### 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
105
+ * Project page: <https://savannah.nongnu.org/projects/wwwjdic/>
106
+ * Source code (Mercurial) repository: <http://hg.savannah.gnu.org/hgweb/wwwjdic/>
107
+ * Known Bugs: <https://savannah.nongnu.org/bugs/?group=wwwjdic>
108
+ * Users Mailing List: <https://savannah.nongnu.org/mail/?group=wwwjdic>
109
+ * News: <https://savannah.nongnu.org/news/?group=wwwjdic>
130
110
 
131
111
  #### 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
-
112
+ * Gem page: <https://rubygems.org/gems/wwwjdic>
113
+ * Online RDoc: <http://rubydoc.info/gems/wwwjdic/>
114
+ * Gem updates Atom Feed:
115
+ <https://rubygems.org/gems/wwwjdic/versions.atom>
116
+
117
+ ## Usage
118
+ See `examples` folder.
119
+ To run the examples just run `ruby `{EXAMPLE_NAME}`.rb`.
120
+ Running the examples you'll see both the example description and correct
121
+ code usage to perform such action.
122
+ Here below there are the currently available examples:
149
123
  * The `basics.rb` example (run `ruby examples/basics.rb`) shows how to
150
124
  initialize and use a WWWJDic object through the `breener` factory
151
125
  method;
152
126
  * 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
127
+ different types of translation URIs at WWWJDic, with all available
128
+ options and configurations.
129
+ * The `translate.rb` example (run `ruby examples/translate.rb`) shows
156
130
  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
-
131
+ with all available options and configurations.
132
+ It will also show how to download such translation;
133
+
134
+ Using this API is pretty simple.
135
+ First, remember that this API maintains a context, so you can save your
136
+ preferred configuration of server, dictionary, output formats, ... by
137
+ assigning those value to your object.
138
+ Get a reference to the WWWJDic object, through its factory method, with
139
+ `my_wwwjdic = WWWJDic::breener`.
165
140
  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
-
141
+ At this point the object does contain a default configuration in terms
142
+ of dictionary, server, ...
143
+
144
+ You can take a look at the current status/configuration of your
145
+ `my_wwwjdic` object using the `dictionary` method
146
+ `my_wwwjdic.dictionary` that shows the dictionary currently in use
147
+ (default is `Jpn-Eng General (EDICT)`), or using the `server` method
148
+ `my_wwwjdic.server` that shows the dictionary server currently in use
149
+ (default is `http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?`).
150
+
151
+ * `dictionary`: you can set your own dictionary through the same
152
+ `dictionary` method, by assigning it one of the available
153
+ dictionaries, either using the dictionary number, or the (exact)
154
+ dictionary name.
155
+
156
+ | Number | Dictionary Name |
157
+ |:------:|---------------------------|
158
+ | 1 | Jpn-Eng General (EDICT) |
159
+ | 2 | Japanese Names (ENAMDICT) |
160
+ | 3 | Computing/Telecomms |
161
+ | 4 | Life Sciences/Bio-Med |
162
+ | 5 | Legal Terms |
163
+ | 6 | Finance/Marketing |
164
+ | 7 | Buddhism |
165
+ | 8 | Miscellaneous |
166
+ | 9 | Special Text-glossing |
167
+ | A | Engineering/Science |
168
+ | B | Linguistics |
169
+ | C | River & Water Systems |
170
+ | D | Automobile Industry |
171
+ | E | Japanese Wordnet |
172
+ | F | Work-in-progress File |
173
+ | G | Japanese-German (WaDoku) |
174
+ | H | Japanese-French |
175
+ | I | Japanese-Russian |
176
+ | J | Japanese-Swedish |
177
+ | K | Japanese-Hungarian |
178
+ | L | Japanese-Spanish |
179
+ | M | Japanese-Dutch |
180
+ | N | Japanese-Slovenian |
181
+ | O | Japanese-Italian |
182
+ | P | Untranslated |
183
+ | Q | Combined Jpn-Eng |
184
+ | R | Expanded Text-glossing |
185
+
186
+ For example, with `my_wwwjdic.dictionary = '7'` you set the `Buddhism`
187
+ dictionary or with `my_wwwjdic.dictionary = 'Japanese Wordnet'` you
188
+ just set the `Japanese Wordnet` one.
189
+ Your `my_wwwjdic` object saves and maintains these values unless
190
+ reset.
191
+ * `server`: you can set your own server through the same `server`
192
+ method, by assigning it one of the available servers.
193
+ Using `my_wwwjdic.server = :edrdg` the library will use the main
194
+ (default) URL at <http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?>
195
+ for the dictionary server while instead using
196
+ `my_wwwjdic.server = :monash` will use the URL
197
+ <http://nihongo.monash.edu/cgi-bin/wwwjdic?> that relays on Monash
198
+ University mirror.
199
+ * `uri`: you can ask for a translation reference URL; that is not a
200
+ translation by itself, but it's the full URL where to find the
201
+ translation.
202
+ * You can get the translation URL of a specific word using the command
203
+ `my_wwwjdic.uri '`word`'` that returns the normal URL.
204
+ * Then you can use the `my_wwwjdic.raw_uri '`word`'`, for the raw
205
+ display format.
206
+ The raw dictionary display option is useful for calls from other
207
+ programs, smartphones, etc.
208
+ It omits all header and footer information from the pages, and
209
+ displays the unedited dictionary entries in EDICT and KANJIDIC
210
+ format, one-per-line and encapsulated by <pre> ... </pre>.
211
+ In this option the output is always in UTF-8 coding.
212
+ * the `my_wwwjdic.json_uri '`word`'` command, instead, returns the URL
213
+ for translation of `word` in a JSON format as `{ "`word`: "`url`" }`
214
+ with normal display format.
215
+ * `translate`: you can, finaly, obviously ask for a specific translation
216
+ using the configured parameters.
217
+ * you can get a simple translation with the command
218
+ `my_wwwjdic.translate 'word'`, that returns a string containing the
219
+ web page content of the translation of `word` in the raw display
220
+ format.
221
+ It's equivalent to `my_wwwjdic.translate 'word', display: :raw`.
222
+ * `my_wwwjdic.translate 'word', nil, filename`, regardless the `nil`
223
+ (see it later), the third `filename` parameter is the name of the
224
+ file where the translation will be saved into.
225
+ Specifying this `filename` parameter, the translation will not be
226
+ shown, but it will be saved in the specified file.
227
+ * Another possible result for translation is to get it in JSON format
228
+ also with the possibility to save it in a file:
229
+ `my_wwwjdic.json_translate 'word'`, returns the JSON format of the
230
+ translation:
231
+ * The JSON will contain a field having the same name of the word to
232
+ be translated that contains the URL of the translation from the
233
+ reference dictionary server used.
234
+ The URL is exatcly the same used to retrieve the translation and
235
+ filling the resulting JSON.
236
+ * The `title` field will contain the title of the translation page
237
+ result.
238
+ * The `translation` field will contain the raw translation as
239
+ received from the server.
240
+ * The `message` field will contain all the text that will possibly
241
+ be included as error message in the translation.
242
+ This means that if any `<p>` tag encloses some text, such text
243
+ will be presented in this `message` field.
244
+ * The `lines` field will contain an array of all the lines of the
245
+ translation, that is: the `lines` field contains a split of the
246
+ `translation` field using its existing `\n` characters.
247
+ * The `content` field contains an array of JSON objects, each
248
+ containing the formatted translation of each line:
249
+ * a field with the name of the word asked for translation,
250
+ containing the actual translation, first field of the
251
+ translation in each line;
252
+ * a `kana` field with the kana writing for the translation, as
253
+ shown in brackets, in each line;
254
+ * a `text` field containing the explanation associated to such
255
+ translation;
256
+ * a `meanings` field containing the different meaning associated
257
+ to each line.
258
+ The `/` characters mark the splitting point for each line.
259
+
260
+ So, basically, the JSON will contain the whole raw translation, the
261
+ same translation split into different lines, when asked by the
262
+ translation itself, and each of those lines above split again into a
263
+ set of available meanings.
264
+
265
+ For the example translation above, the resulting JSON format is:
266
+ ```json5
267
+ {
268
+ "word": "http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1ZDQword",
269
+ "title": "WWWJDIC: Word Display",
270
+ "translation": "伝言 [つてこと] /(n) (1) (See 伝言・でんごん) verbal message/word (from someone)/(n) (2) rumour/rumor/\n伝言 [でんごん] /(n,vs) verbal message/word (from someone)/(P)/\n一議 [いちぎ] /(n) word (opinion, objection)/\n言の葉 [ことのは;ことのえ] /(n) (1) (arch) word/(n) (2) (See 和歌) waka (classic Japanese poem, esp. a tanka)/\nワード /(n) (1) word/(n) (2) {comp} word/(n) (3) {comp} Word/Microsoft Word/(P)/\n語 [ご] /(n,n-suf) (1) language/(n,n-suf,ctr) (2) word/(P)/\n単語 [たんご] /(n,adj-no) {ling} word/vocabulary/(usually) single-character word/(P)/\n訪れ [おとずれ] /(n) (1) visit/call/(n) (2) arrival (e.g. of spring)/advent/coming/appearance/(n) (3) news/tidings/word/(P)/\n音沙汰;音さた [おとさた] /(n) news (from someone)/word/contact/\n言 [げん(P);こと] /(n) word/remark/statement/(P)/\n知らせ(P);報せ [しらせ] /(n) (1) (See お知らせ) news/word/tidings/notice/notification/information/(n) (2) omen/(P)/\n言葉(P);詞;辞 [ことば(P);けとば(言葉)(ok)] /(n) (1) (See 言語) language/dialect/(n) (2) (See 単語) word/words/phrase/term/expression/remark/(n) (3) speech/(manner of) speaking/(n) (4) learning to speak/language acquisition/(P)/",
271
+ "message": null,
272
+ "lines": [
273
+ "伝言 [つてこと] /(n) (1) (See 伝言・でんごん) verbal message/word (from someone)/(n) (2) rumour/rumor/",
274
+ "伝言 [でんごん] /(n,vs) verbal message/word (from someone)/(P)/",
275
+ "一議 [いちぎ] /(n) word (opinion, objection)/",
276
+ "言の葉 [ことのは;ことのえ] /(n) (1) (arch) word/(n) (2) (See 和歌) waka (classic Japanese poem, esp. a tanka)/",
277
+ "ワード /(n) (1) word/(n) (2) {comp} word/(n) (3) {comp} Word/Microsoft Word/(P)/",
278
+ "語 [ご] /(n,n-suf) (1) language/(n,n-suf,ctr) (2) word/(P)/",
279
+ "単語 [たんご] /(n,adj-no) {ling} word/vocabulary/(usually) single-character word/(P)/",
280
+ "訪れ [おとずれ] /(n) (1) visit/call/(n) (2) arrival (e.g. of spring)/advent/coming/appearance/(n) (3) news/tidings/word/(P)/",
281
+ "音沙汰;音さた [おとさた] /(n) news (from someone)/word/contact/",
282
+ "言 [げん(P);こと] /(n) word/remark/statement/(P)/",
283
+ "知らせ(P);報せ [しらせ] /(n) (1) (See お知らせ) news/word/tidings/notice/notification/information/(n) (2) omen/(P)/",
284
+ "言葉(P);詞;辞 [ことば(P);けとば(言葉)(ok)] /(n) (1) (See 言語) language/dialect/(n) (2) (See 単語) word/words/phrase/term/expression/remark/(n) (3) speech/(manner of) speaking/(n) (4) learning to speak/language acquisition/(P)/"
285
+ ],
286
+ "content": [
287
+ {
288
+ "word": "伝言",
289
+ "kana": "つてこと",
290
+ "text": "(n)(1) (See 伝言・でんごん) verbal message/word (from someone)/(n) (2) rumour/rumor",
291
+ "meanings": [
292
+ "(n) (1) (See 伝言・でんごん) verbal message",
293
+ "word (from someone)",
294
+ "(n) (2) rumour",
295
+ "rumor"
296
+ ]
297
+ },
232
298
  {
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
299
+ "word": "伝言",
300
+ "kana": "でんごん",
301
+ "text": "(n,vs) verbal message/word (from someone)/(P)",
302
+ "meanings": [
303
+ "(n,vs) verbal message",
304
+ "word (from someone)",
305
+ "(P)"
306
+ ]
307
+ },
308
+ {
309
+ "word": "一議",
310
+ "kana": "いちぎ",
311
+ "text": "(n) word (opinion, objection)"
312
+ },
313
+ {
314
+ "word": "言の葉",
315
+ "kana": "ことのは;ことのえ",
316
+ "text": "(n) (1) (arch) word/(n) (2) (See 和歌) waka (classic Japanese poem, esp. a tanka)",
317
+ "meanings": [
318
+ "(n) (1) (arch) word",
319
+ "(n) (2) (See 和歌) waka (classic Japanese poem, esp. a tanka)"
320
+ ]
321
+ },
322
+ {
323
+ "kana": "ワード",
324
+ "word": "ワード",
325
+ "text": "(n) (1) word/(n) (2) {comp} word/(n) (3) {comp} Word/Microsoft Word/(P)",
326
+ "meanings": [
327
+ "(n) (1) word",
328
+ "(n) (2) {comp} word",
329
+ "(n) (3) {comp} Word",
330
+ "Microsoft Word",
331
+ "(P)"
332
+ ]
333
+ },
334
+ {
335
+ "word": "語",
336
+ "kana": "ご",
337
+ "text": "(n,n-suf) (1) language/(n,n-suf,ctr) (2) word/(P)",
338
+ "meanings": [
339
+ "(n,n-suf) (1) language",
340
+ "(n,n-suf,ctr) (2) word",
341
+ "(P)"
342
+ ]
343
+ },
344
+ {
345
+ "word": "単語",
346
+ "kana": "たんご",
347
+ "text": "(n,adj-no) {ling} word/vocabulary/(usually) single-character word/(P)",
348
+ "meanings": [
349
+ "(n,adj-no) {ling} word",
350
+ "vocabulary",
351
+ "(usually) single-character word",
352
+ "(P)"
353
+ ]
354
+ },
355
+ {
356
+ "word": "訪れ",
357
+ "kana": "おとずれ",
358
+ "text": "(n) (1) visit/call/(n) (2) arrival (e.g. of spring)/advent/coming/appearance/(n) (3) news/tidings/word/(P)",
359
+ "meanings": [
360
+ "(n) (1) visit",
361
+ "call",
362
+ "(n) (2) arrival (e.g. of spring)",
363
+ "advent",
364
+ "coming",
365
+ "appearance",
366
+ "(n) (3) news",
367
+ "tidings",
368
+ "word",
369
+ "(P)"
370
+ ]
371
+ },
372
+ {
373
+ "word": "音沙汰;音さた",
374
+ "kana": "おとさた",
375
+ "text": "(n) news (from someone)/word/contact",
376
+ "meanings": [
377
+ "(n) news (from someone)",
378
+ "word",
379
+ "contact"
380
+ ]
381
+ },
382
+ {
383
+ "word": "言",
384
+ "kana": "げん(P);こと",
385
+ "text": "(n) word/remark/statement/(P)",
386
+ "meanings": [
387
+ "(n) word",
388
+ "remark",
389
+ "statement",
390
+ "(P)"
391
+ ]
392
+ },
393
+ {
394
+ "word": "知らせ(P);報せ",
395
+ "kana": "しらせ",
396
+ "text": "(n) (1) (See お知らせ) news/word/tidings/notice/notification/information/(n) (2) omen/(P)",
397
+ "meanings": [
398
+ "(n) (1) (See お知らせ) news",
399
+ "word",
400
+ "tidings",
401
+ "notice",
402
+ "notification",
403
+ "information",
404
+ "(n) (2) omen",
405
+ "(P)"
406
+ ]
407
+ },
408
+ {
409
+ "word": "言葉(P);詞;辞",
410
+ "kana": "ことば(P);けとば(言葉)(ok)",
411
+ "text": "(n) (1) (See 言語) language/dialect/(n) (2) (See 単語) word/words/phrase/term/expression/remark/(n) (3) speech/(manner of) speaking/(n) (4) learning to speak/language acquisition/(P)",
412
+ "meanings": [
413
+ "(n) (1) (See 言語) language",
414
+ "dialect",
415
+ "(n) (2) (See 単語) word",
416
+ "words",
417
+ "phrase",
418
+ "term",
419
+ "expression",
420
+ "remark",
421
+ "(n) (3) speech",
422
+ "(manner of) speaking",
423
+ "(n) (4) learning to speak",
424
+ "language acquisition",
425
+ "(P)"
426
+ ]
237
427
  }
238
-
428
+ ]
429
+ }
430
+ ```
431
+ Please note that the resulting JSON is not pretty-printed, as shown
432
+ here.
239
433
  * 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&amp;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
-
434
+ `nil` in the examples), the arguments for the translation.
435
+ The default is to translate to/from English/Japanese with normal
436
+ display layout and no other specificities, except that the API
437
+ automatically identifies Japanese or English and manages the romaji
438
+ and so on.
439
+ The returned URL is the default EDR&DG one, as required by Jim Breen
440
+ himself.
441
+ What if the user wants to customize something?
442
+ The `args`, second parameter of all those methods above, is a
443
+ dictionary (hash map) that allows specifying which parameters and to
444
+ which values they shall be set.
445
+
446
+ Valid parameters, and their values are:
251
447
  * `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'`.
448
+ dictionaries:
449
+
450
+ | Number | Dictionary Name |
451
+ |:------:|---------------------------|
452
+ | 1 | Jpn-Eng General (EDICT) |
453
+ | 2 | Japanese Names (ENAMDICT) |
454
+ | 3 | Computing/Telecomms |
455
+ | 4 | Life Sciences/Bio-Med |
456
+ | 5 | Legal Terms |
457
+ | 6 | Finance/Marketing |
458
+ | 7 | Buddhism |
459
+ | 8 | Miscellaneous |
460
+ | 9 | Special Text-glossing |
461
+ | A | Engineering/Science |
462
+ | B | Linguistics |
463
+ | C | River & Water Systems |
464
+ | D | Automobile Industry |
465
+ | E | Japanese Wordnet |
466
+ | F | Work-in-progress File |
467
+ | G | Japanese-German (WaDoku) |
468
+ | H | Japanese-French |
469
+ | I | Japanese-Russian |
470
+ | J | Japanese-Swedish |
471
+ | K | Japanese-Hungarian |
472
+ | L | Japanese-Spanish |
473
+ | M | Japanese-Dutch |
474
+ | N | Japanese-Slovenian |
475
+ | O | Japanese-Italian |
476
+ | P | Untranslated |
477
+ | Q | Combined Jpn-Eng |
478
+ | R | Expanded Text-glossing |
479
+
268
480
  * `display` parameter to select the final format of the referred
269
481
  HTML page (either regular HTML or raw): `:regular`, `:raw`.
270
482
  * `server` allows the user to select from the default URL (at
271
483
  Electronic Dictionaries R&D Group) or the Monash university URL:
272
484
  `:edrdg`, `:monash`.
273
485
 
274
- Some examples of these parameters' usage:
486
+ Some examples of these parameters' usage:
487
+ * `my_wwwjdic.translate 'Sprache', dict: 'G', key: english`, this
488
+ translates using the `F` dictionary, that is the German one
489
+ * `my_wwwjdic.uri 'Sprache', dict: 'G'`, same as above, but returns
490
+ the translation URL, instead
491
+ * `my_wwwjdic.raw_uri 'Sprache', dict: 'G'`, same as above, but
492
+ returns the translation URL with raw display, instead
493
+ * `my_wwwjdic.uri 'Sprache', dict: 'G', display: raw`
494
+
495
+ ## Maintainers
496
+ * [Marco Bresciani](https://savannah.nongnu.org/users/marcobresciani)
497
+
498
+ ## Thanks
499
+ * *Contributor*: [Jim
500
+ Breen](http://www.csse.monash.edu.au/~jwb/index.html)
501
+
502
+ * *Author*: [Jon Maken](mailto:jon.forums@gmail.com), [An HTTP/HTTPS/FTP
503
+ file downloader library/CLI based upon MiniPortile's HTTP
504
+ implementation.](https://gist.github.com/jonforums/2202048)
505
+ About *An HTTP/HTTPS/FTP file downloader library/CLI based upon
506
+ MiniPortile's HTTP implementation*, please note that "License:
507
+ 3-clause BSD".
508
+ This license is GNU GPLv3 compatible according to
509
+ <http://www.gnu.org/licenses/license-list.en.html#ModifiedBSD>.
510
+
511
+ FSIJ理事会の理事長、[新部裕](mailto:gniibe@fsij.org)さんの日本語の翻訳。
512
+ Japanese translation by [Yutaka Niibe](mailto:gniibe@fsij.org),
513
+ President of Free Software Initiative of Japan.
514
+
515
+ Thanks to Łukasz Niemier for his suggestions on possible improvements.
516
+
517
+ ## Contributing
518
+ WWWJDic tries to follow semantic versioning (see <http://semver.org/>).
519
+ There may be backward incompatible changes each time minor version
520
+ number changes, but that any tiny version number change should be bug
521
+ fixes and internal changes only.
522
+ Be sure to read the `CHANGELOG` each time we cut a new release and lock
523
+ your gems accordingly.
275
524
 
276
- my_wwwjdic.translate 'sprache', dict: 'F' # this translates using the 'F' dictionary, that is the German one
525
+ RDoc documentation available in the `html` folder.
277
526
 
278
- my_wwwjdic.uri 'sprache', dict: 'F' # same as above, but returns the translation URL, instead
527
+ The easiest way to get help with WWWJDic is to post a message to the
528
+ mailing list: `http://lists.nongnu.org/mailman/listinfo/wwwjdic-users`
279
529
 
280
- my_wwwjdic.raw_uri 'sprache', dict: 'F' # same as above, but returns the translation URL with raw display, instead
530
+ Feel free to post any question there, developers are responsive and will
531
+ be happy to help you figure out how to use WWWJDic, or help you
532
+ determine whether it's the right tool for the task you are working on.
281
533
 
282
- my_wwwjdic.uri 'sprache', dict: 'F', display: raw # same as above
534
+ Please make your posts to the list as specific as possible, including
535
+ code samples and output where relevant.
536
+ Do not post any information that should not be shared publicly, and be
537
+ sure to reduce your example code as much as possible so that those who
538
+ are responding to your question can more easily see what the issue might
539
+ be.
283
540
 
284
- ------------------------------------------
541
+ If you've found a bug, want to submit a patch, or have a feature
542
+ request, please enter a ticket into our bug tracker:
543
+ `https://savannah.nongnu.org/bugs/?func=additem&group=wwwjdic`
285
544
 
286
- wwwjdic
545
+ We strongly encourage adding bug reports with failing tests or at least
546
+ a reduced example that demonstrates the problem.
547
+
548
+ Similarly, patches should include tests, API documentation, and an
549
+ update to the manual where relevant.
550
+ Feel free to clone early though and participate in the project, if you
551
+ just want some feedback, or a code review before preparing your code to
552
+ be merged.
553
+
554
+ If you are unsure about whether you've found a bug, or want to check to
555
+ see whether we'd be interested in the feature you want to add before you
556
+ start working on it, feel free to post to our mailing list.
557
+
558
+ ## License
559
+ SPDX-FileCopyrightText: 2014 Marco Bresciani
560
+
561
+ SPDX-License-Identifier: GFDL-1.3-or-later
287
562
 
288
- Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
563
+ (C) 2014 Marco Bresciani
289
564
 
290
565
  This file is part of wwwjdic.
291
566