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.3.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.3-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fstdtools-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 7934529eaed1a10daf4d412e3a4a8b8f184abc98a45dcac53a28842896ba1834
MD5 4105c198a449c580444edd93afd76f71
BLAKE2b-256 6ca260e96192200ae5c4ae7b0694821bf7db22597bd3a9bfa1e78b2d77eaaa3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fstdtools-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: fstdtools-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5f83d5c1fb6493118851bdfb42748c2427e1c2834b2025deb88287b837ccc096
MD5 522ca4e5a393498866d4a54c131936d4
BLAKE2b-256 43bca6f72282cd3c6bc3636f1cb37d3ad6a8e240e2cc07ec3faea56473630b47

See more details on using hashes here.

Provenance

The following attestation bundles were made for fstdtools-0.0.3-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