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.5.tar.gz (29.5 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.5-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fstdtools-0.0.5.tar.gz
  • Upload date:
  • Size: 29.5 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.5.tar.gz
Algorithm Hash digest
SHA256 0600232ef696da0569862070e4793892c43c8921a44b8b101697750c8dcc5233
MD5 200c8dcab8b6f1c212d3eda4ee24753d
BLAKE2b-256 09f994c304a09cb2b4fb29dd314132e22eb7b462966dda30c27d16e5e43fe6ca

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fstdtools-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 31.2 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c75b44a88a510ec99bc9822457742acd550e5bf130832d6b6502fdfb33362067
MD5 0216b6ac29c443ba27defeb326c52d38
BLAKE2b-256 334c9126851d50ebea85e1c1d9bc83b83eb3160128e688d54f873bb15c3e3f75

See more details on using hashes here.

Provenance

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