@etrog/export-apple 1.0.0 → 1.0.1
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.
- package/README.md +32 -0
- package/package.json +8 -1
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @etrog/export-apple
|
|
2
|
+
|
|
3
|
+
Apple Dictionary Services XML exporter for the [Etrog](https://github.com/dsifriend/etrog) Linguistic Linked Open Data library.
|
|
4
|
+
|
|
5
|
+
Converts an `@etrog/core` `Lexicon` into a well-formed XML source file ready for use with Apple's [Dictionary Development Kit](https://developer.apple.com/download/all/?q=Additional%20Tools) (DDK). The output follows the `d:` namespace schema (`http://www.apple.com/DTDs/DictionaryService-1.0.rng`) with XHTML content inside each `<d:entry>`.
|
|
6
|
+
|
|
7
|
+
Mapped fields include headwords, all inflected forms (for lookup indexing), part of speech, IPA pronunciation, per-sense definitions, usage examples, and cross-lingual translations. CJK `d:yomi` index attributes are supported where a phonetic representation is present.
|
|
8
|
+
|
|
9
|
+
> **No DDK dependency.** This package only generates the XML source file. To build the final `.dictionary` bundle you must separately install Apple's Dictionary Development Kit, available from Apple Developer Downloads as part of "Additional Tools for Xcode".
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @etrog/export-apple
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { exportAppleDictionary } from "@etrog/export-apple";
|
|
21
|
+
|
|
22
|
+
const xml = exportAppleDictionary(lexicon);
|
|
23
|
+
// Write xml to a .xml file, then run Apple DDK's build_dict.sh
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Documentation
|
|
27
|
+
|
|
28
|
+
Full element mapping and export options are in the [Etrog monorepo README](https://github.com/dsifriend/etrog#readme).
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etrog/export-apple",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/dsifriend/etrog.git",
|
|
9
|
+
"directory": "packages/export-apple"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/dsifriend/etrog#readme",
|
|
5
12
|
"main": "./dist/index.js",
|
|
6
13
|
"types": "./dist/index.d.ts",
|
|
7
14
|
"files": [
|