1
yomichan-import/README.md

96 lines
4.9 KiB
Markdown
Raw Normal View History

2017-03-01 06:26:01 +00:00
# Yomichan Import #
2016-12-30 01:35:03 +00:00
2017-02-27 00:48:58 +00:00
Yomichan Import allows users of the [Yomichan](https://foosoft.net/projects/yomichan) extension to import custom dictionary files. It currently
supports the following formats:
2016-12-30 01:35:03 +00:00
* [JMdict](http://www.edrdg.org/jmdict/edict_doc.html)
* [JMnedict](http://www.edrdg.org/enamdict/enamdict_doc.html)
* [KANJIDIC2](http://www.edrdg.org/kanjidic/kanjd2index.html)
* [EPWING](https://ja.wikipedia.org/wiki/EPWING)
2017-03-22 04:10:01 +00:00
* [Daijirin](https://en.wikipedia.org/wiki/Daijirin) (三省堂 スーパー大辞林)
* [Daijisen](https://en.wikipedia.org/wiki/Daijisen) (大辞泉)
* [Kenkyusha](https://en.wikipedia.org/wiki/Kenky%C5%ABsha%27s_New_Japanese-English_Dictionary) (研究社 新和英大辞典 第5版)
* [Kotowaza](http://www.web-nihongo.com/wn/dictionary/dic_21/d-index.html) (故事ことわざの辞典)
* [Meikyou](https://ja.wikipedia.org/wiki/%E6%98%8E%E9%8F%A1%E5%9B%BD%E8%AA%9E%E8%BE%9E%E5%85%B8) (明鏡国語辞典)
2016-12-30 01:35:03 +00:00
2017-01-02 23:29:52 +00:00
Yomichan Import is being expanded to support other EPWING dictionaries based on user demand. This is a mostly
2017-04-01 21:25:26 +00:00
non-technical (although laborious) process that requires writing regular expressions and creating font tables; volunteer
contributions are welcome.
2016-12-30 01:35:03 +00:00
## Installation ##
2017-05-06 23:55:34 +00:00
Builds of Yomichan Import are currently available for Linux, Mac OS X, and Windows. The required version of
[Zero-EPWING](https://foosoft.net/projects/zero-epwing) is included for processing EPWING dictionaries.
2016-12-31 05:36:55 +00:00
2017-04-23 22:02:55 +00:00
* [yomichan-import_linux.tar.gz](https://foosoft.net/projects/yomichan-import/dl/yomichan-import_linux.tar.gz): (GTK+ 3 required for GUI)
2017-01-30 06:28:23 +00:00
* [yomichan-import_darwin.tar.gz](https://foosoft.net/projects/yomichan-import/dl/yomichan-import_darwin.tar.gz)
2017-05-06 23:55:34 +00:00
* [yomichan-import_windows.zip](https://foosoft.net/projects/yomichan-import/dl/yomichan-import_windows.zip) (64 bit Vista or above, no console output)
2016-12-30 01:35:03 +00:00
2017-05-06 23:55:34 +00:00
## Using the Graphical Interface ##
2016-12-30 01:35:03 +00:00
2017-05-06 23:55:34 +00:00
In most cases, it is sufficient to run the application without command line arguments and use the graphical interface.
Follow the steps below to import your dictionary into Yomichan:
1. Launch the `yomichan-import` executable.
2. Specify the path to the dictionary you wish to convert (path to `CATALOGS` file for EPWING dictionaries).
3. Specify a network port to use (the default port `9876` should be fine for most configurations).
4. Specify the dictionary format from the provided options.
5. Press the button labeled *Import dictionary...* and wait for processing to complete.
6. Once you the message `starting dictionary server on port 9876...`, the dictionary data is ready to be imported.
7. In Yomichan, open the options page and select the *Local dictionary* item in the dictionary importer drop-down menu.
8. When `http://localhost:9876/index.json` is displayed in the address text-box, press the *Import* button to begin import.
9. Wait for the import progress to complete (a progress bar is displayed during dictionary processing).
9. Close Yomichan Import once the import process has finished.
[![Import window](https://foosoft.net/projects/yomichan-import/img/import-thumb.png)](https://foosoft.net/projects/yomichan-import/img/import.png)
## Using the Command Line ##
Yomichan Import can be used as a command line application. When executed with the `--help` argument, usage instructions
will be displayed (except on Windows).
2016-12-30 01:35:03 +00:00
```
2016-12-31 05:36:55 +00:00
Usage: yomichan-import [options] input-path [output-dir]
2016-12-30 01:35:03 +00:00
https://foosoft.net/projects/yomichan-import/
Parameters:
-format string
dictionary format [edict|enamdict|kanjidic|epwing]
-port int
port to serve dictionary JSON on (default 9876)
-pretty
output prettified dictionary JSON
-serve
serve dictionary JSON for extension
-stride int
dictionary bank stride (default 10000)
-title string
dictionary title
```
2017-05-06 23:55:34 +00:00
In most cases it is sufficient to simply provide the path to the dictionary resource you wish to process, without
explicitly specifying a format. Yomichan Import will attempt to automatically determine the format of the dictionary
based on the contents of the path:
2016-12-30 01:35:03 +00:00
| Format | Resource |
| ------------ | ------------------------------------ |
| **edict** | file named `JMDict_e.xml` |
| **enamdict** | file named `JMNedict.xml` |
| **kanjidic** | file named `kanjidic2.xml` |
| **epwing** | directory with file named `CATALOGS` |
2016-12-31 23:10:03 +00:00
For example, if you wanted to process an EPWING dictionary titled Daijirin, you could do so with the following command
(shown on Linux):
2016-12-30 01:35:03 +00:00
```
2016-12-31 23:10:03 +00:00
$ ./yomichan-import dict/Kokugo/Daijirin/
2016-12-30 01:35:03 +00:00
```
2017-05-06 23:55:34 +00:00
Yomichan Import will now begin the conversion process, which can take a couple of minutes to complete. Once you see the
message `starting dictionary server on port 9876...` output to your console, you can use Yomichan to import the
processed dictionary data using the same steps as described in the *Using the Graphical Interface* section.
2017-04-15 04:05:23 +00:00
2016-12-30 01:35:03 +00:00
## License ##
MIT