Skip to content

itkach/xdxf2slob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

xdxf2slob

This is a tool to convert XDXF dictionary files to slob format.

Installation

Create Python 3 virtual environment and install slob.py as described at http://github.org/itkach/slob/.

In this virtual environment run

pip install git+https://github.com/itkach/xdxf2slob.git

Usage

Download an XDXF dictionary archive. For example:

wget http://downloads.sourceforge.net/project/xdxf/dicts-XDXF/dictd04/comn_dictd04_mueller7.tar.bz2

Then run converter:

xdxf2slob comn_dictd04_mueller7.tar.bz2

comn_dictd04_mueller7.slob will be created in the same directory.

Verify dictionary tags:

slob info comn_dictd04_mueller7.slob

Set tag values as necessary, for example:

slob tag -n license.name -v "Public domain" comn_dictd04_mueller7.slob
slob tag -n created.by -v me@example.com comn_dictd04_mueller7.slob
usage: xdxf2slob [-h] [--skip-article-title] [--remove-newline]
                 [-o OUTPUT_FILE] [-c {lzma2,zlib}] [-b BIN_SIZE]
                 [-a CREATED_BY] [-w WORK_DIR]
                 input_file

positional arguments:
  input_file            XDXF file name

optional arguments:
  -h, --help            show this help message and exit
  --skip-article-title  Do not include article key in rendered article: some
                        XDXF dictionaries already inlude title in article text
                        and need this to avoid title duplication
  --remove-newline      Remove new line characters from article text
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        Name of output slob file
  -c {lzma2,zlib}, --compression {lzma2,zlib}
                        Name of compression to use. Default: zlib
  -b BIN_SIZE, --bin-size BIN_SIZE
                        Minimum storage bin size in kilobytes. Default: 256
  -a CREATED_BY, --created-by CREATED_BY
                        Value for created.by tag. Identifier (e.g. name or
                        email) for slob file creator
  -w WORK_DIR, --work-dir WORK_DIR
                        Directory for temporary files created during
                        compilation. Default: .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published