2.0.0 • Published 5 years ago
@seangenabe/tangonoya-common v2.0.0
Tangonoya
Data source for Japanese words and kanji.
Usage
JMdict updater
import { updateDatabase } from "./jmdict"
updateDatabase(db: PouchDB.Database, opts = {}): Promise
Updates a PouchDB database with the latest entries from JMdict. pouchdb-upsert
is required.
db
- A PouchDB database.opts.gunzipUrl
- Passed togunzip-then-rsync
opts.rsyncSource
- Passed togunzip-then-rsync
opts.idPrefix
- Prefixed to document IDs. Default:jmdict/
WaniKani updater
import { updateDatabase } from "./wanikani"
updateDatabase(db: PouchDB.Database, opts): Promise
Updates a PouchDB database with 'subjects' from the WaniKani API. pouchdb-upsert
is required.
db
- A PouchDB database.opts.apiKey
- A WaniKani v2 API key.opts.idPrefix
- Prefixed to document IDs. Default:wanikani/
License
This source code itself is licensed with MIT. However, source files may be licensed under different terms:
- The JMdict is under the EDRDG General Dictionary Licence Statement.
- Usage of the WaniKani API is covered by the WaniKani Terms of Service