Skip to main content

CLI tools to compile/search/list/info fstd dictionary and convert mdx/mdd to fstdx/fstdd

Project description

fstdtools

A command line tool to compile/search/list/info fstd dictionary and convert mdx/mdd to fstdx/fstdd.

Install

pip install fstdtools

Usage

Compile

Convert mdx/mdd to fstdx/fstdd

fstdtools write dict.mdx
fstdtools write dict.mdd

Compile a raw txt file to fstdx

fstdtools write dict.txt
  1. The first entry requires no preceding delimiter: write the entry word (key) directly, followed by its corresponding definition (value). Definitions can span multiple lines, but entry words must stay on a single line.
  2. Starting from the second entry, each entry word (key) must be preceded by the delimiter </>. Entry words must still be written on one line, while definitions can span multiple lines.
  3. The end of each complete entry (entry word + corresponding definition) must be marked with the delimiter </> as a closing tag.
Ab
The definition of Ab
</>
Ababdeh
The definition of Ababdeh
</>
Abby
The definition of Abby
</>
...

Compile a directory to fstdd

# data is a directory
fstdtools write data dict.mdd

It's supported to compile a fstdx from a fstdx file, but not supported for fstdd now.

fstdtools -v write -b 8 -c 15 -d 130 -T "dict titile" -D "dict description" dict.fstdx dict.15-8-130.fstdx

Extract

Extract raw text from a fstdx

fstdtools extract dict.fstdx

Extract all files from a fstdd

fstdtools extract dict.fstdd

Extract a single file from a fstdd by key path

fstdtools extract -k path/to/1.png dict.fstdd

Search

Show the meta information of fstdx/fstdd

fstdtools search -m dict.fstdx
fstdtools search -m dict.fstdd

All key list of fstdx/fstdd

fstdtools search -u dict.fstdx
fstdtools search -u dict.fstdd

Query the value of a key from fstdx

fstdtools search -k dictionary dict.fstdx

Search a regex pattern

fstdtools search -r 'd.*i.*on.*y$' dict.fstdx

Spell-check a word

fstdtools search -s 'condiction' dict.fstdx

Fuzzy search based on edit distance

fstdtools search -g 'testingsx'  test.fstdx

Prefix distance with prior suffix search from multiple fstdx files

fstdtools search -P 2 -k 振り返ってるのは  -x "する" -x "う" -x "く" -x "ぐ" -x "す" -x "つ" -x "ぬ" -x "ぶ" -x "む" -x "る" -x "い" -x "하다" -x "다" -f dict.fstdx 

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fstdtools-0.0.4.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fstdtools-0.0.4-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file fstdtools-0.0.4.tar.gz.

File metadata

  • Download URL: fstdtools-0.0.4.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fstdtools-0.0.4.tar.gz
Algorithm Hash digest
SHA256 625e9d131f29ec090125e1dfde52564b49622920fd8c11b3561bbc458dd308f5
MD5 1e79cd2061854506cfcab69ec39b9b04
BLAKE2b-256 76f79eff16f1ef7d2bd2deb8641893a817620f217cd9ad5fecd9f2291c458e1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fstdtools-0.0.4.tar.gz:

Publisher: publish.yml on MouJieQin/fstdtools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fstdtools-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: fstdtools-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fstdtools-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8d447040a5e752eb9d94d1bb3b892359a0ec4765ed4667fa6179fa9521188cde
MD5 f54062e226def414de96cdf21030de14
BLAKE2b-256 c8b6555bd2d9bd7dc0ac97248aace0af26b4da07d6ea4b48ba8a5451829683be

See more details on using hashes here.

Provenance

The following attestation bundles were made for fstdtools-0.0.4-py3-none-any.whl:

Publisher: publish.yml on MouJieQin/fstdtools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page