Skip to main content

CLI tools to pack/unpack/list/info fstd dictionary and convert mdx/mdd to fstdx/fstdd

Project description

fstdtools

A command line tool to pack/unpack/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.2.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.2-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fstdtools-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 83dd7be1cbb652ef74570361c6111c1f220bdb2c80c5f0299d85527f493cb9d4
MD5 21a0246a7c6c26d4e07c2b63fe629ea9
BLAKE2b-256 8c2901a6dc48c134a12aa935b67ffc7e1763ba1ef7d0f4561b4f4e335e7ad165

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fstdtools-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 158790e529e93bd3bc657b4434d48d4151ecf29620d7c36c511a7a1ba8df8fe5
MD5 7e415e34d4bc9f9623abbe3dcd90f1c5
BLAKE2b-256 4c8ec3103f8d417f6ad41518ab934d15ac13b28ac750dc6aaaa996dfde1947b4

See more details on using hashes here.

Provenance

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