Skip to content

Convert dictionaries for MacOSX Dictionary App

License

Notifications You must be signed in to change notification settings

sonerfromnurland/dictconv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dictconv: Mac Dictionary Converter

npm npm GitHub last commit GitHub code size in bytes license

Author: Nogeek

Email: [email protected]

TL;DR

dictconv convert <stardict_xxxxx.tar.bz2> -i -v Building would take some time, please be patient.

Background

A Node.js version of DictUnifier. The original repo is no longer maintained, while I really want a converter for the Stardicts.

Require Node.js >= 12 to support ES module.

Installation

yarn global add @ritou11/dictconv or npm i -g @ritou11/dictconv

You'll also need gunzip, tar,cp,mkdir in your system path. They should be installed with MacOSX already.

Usage

dictconv [command]

Commands:
  dictconv raw <stardict> <destPath>        Convert the startdict to xml
                                            dictionary.
  dictconv build <rawPath> [<destPath>]     Build the Mac dictionary from raw
                                            data
  dictconv convert <stardict> [<destPath>]  Convert the startdict to Mac
                                            dictionary.

Options:
  --version   Show version number                                      [boolean]
  -h, --help  Show help                                                [boolean]
dictconv raw <stardict> <destPath>

Convert the startdict to xml dictionary.

Positionals:
  stardict  <stardict> The path to the stardict file.        [string] [required]
  destPath  <destPath> The destination path.                 [string] [required]
dictconv build <rawPath> [<destPath>]

Build the Mac dictionary from raw data

Positionals:
  rawPath  <rawPath> The path to the raw data files.         [string] [required]

Options:
  --version      Show version number                                   [boolean]
  --name, -n     The name of dictionary                                 [string]
  --install, -i  Install the converted dictionary to the system
                                                      [boolean] [default: false]
dictconv convert <stardict> [<destPath>]

Convert the startdict to Mac dictionary.

Positionals:
  stardict  <stardict> The path to the stardict file.        [string] [required]
  destPath  <destPath> The destination path.                            [string]

Options:
  --version      Show version number                                   [boolean]
  --name, -n     The name of dictionary                                 [string]
  --install, -i  Install the converted dictionary to the system
                                                      [boolean] [default: false]

TODOs

  1. duplicated index
  2. stardict 3.0.0 and idxoffsetbits=64 support
  3. res convert
  4. better way to get the unarchived path

License

MIT

About

Convert dictionaries for MacOSX Dictionary App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 33.3%
  • JavaScript 32.9%
  • Shell 25.2%
  • XSLT 7.4%
  • CSS 1.2%