A CLI tool for generating csv or json files from word dictionaries.
Project description
📘 Dictionary parser
Dictionary parser is a Python CLI tool for processing and exporting dictionary word lists with customizable filters, formats, and casing options.
Perfect for building vocabulary apps, language tools, or educational datasets.
🔧 Features
- ✅ Filter words by starting letter or letter range (
a,a-c,a,c,f) - ✅ Export as JSON or CSV
- ✅ Convert word case:
lower,upper, or no change - ✅ Output to one file or split by starting letter
- ✅ Works with local files or download from a URL
- ✅ Fast and clean CLI powered by Typer
- ✅ Metadata support:
local_index,length - ✅ Sort words in the output files
- ✅ Use local index per letter instead of global index
🚀 Installation
Install via pip:
pip install dictionary-parser
🧪 Quick Usage
dictionary-parser input.txt output/ --letters=a-c --format=csv --case=lower
Arguments:
- input.txt — your source word list file
- output/ — directory for saving results
Options:
| Option | Description |
|---|---|
| --letters | Letter filter: a, a-c, or a,c,f |
| --format | Output format: json (default) or csv |
| --case | Word casing: lower, upper, or nochange (default) |
| --merge | Export all data into one file instead of per-letter files |
| --metadata | Comma-separated list of metadata fields to include: local_index, length |
| --use-local-index | Use local index per letter instead of global index |
| --sort | Sort words in the output files |
| --help | Show help message and exit |
🔍 Examples
Only export words starting with A, B, or C in lowercase CSV:
dictionary-parser input.txt output/ --letters=a-c --format=csv --case=lower
Export only A and F in JSON to a single file:
dictionary-parser input.txt output/ --letters=a,f --merge
📂 Directory Structure
dictionary-parser/
├── dictionary-parser/ # Main CLI app folder
├── docs/ # Docs Folder
├── tests/ # Pytest unit tests
📚 Documentation
Full documentation available at: https://dictionary-parser.readthedocs.io
🧑💻 Contributing
We love contributions! See our CONTRIBUTING.md for how to get started.
📜 License
This project is licensed under the MIT License.
❤️ Credits
Built with Typer and Python.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dictionary_parser-0.3.0.tar.gz.
File metadata
- Download URL: dictionary_parser-0.3.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f15b1e5215586656787b5b381e148f4fd770fd52761a53d9d46703b14f8f4f8a
|
|
| MD5 |
45b5b73a0db5ba4b4b3a1cb63b8f90da
|
|
| BLAKE2b-256 |
88ea3d9c91dc759e3cbe4b3313b6d567ab9c04919a93e99fd97f5b9c8d5e6012
|
Provenance
The following attestation bundles were made for dictionary_parser-0.3.0.tar.gz:
Publisher:
python-publish.yml on thecasualdev17/dictionary-parser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dictionary_parser-0.3.0.tar.gz -
Subject digest:
f15b1e5215586656787b5b381e148f4fd770fd52761a53d9d46703b14f8f4f8a - Sigstore transparency entry: 201496217
- Sigstore integration time:
-
Permalink:
thecasualdev17/dictionary-parser@ce1c30a78774ee80172c349bf0240ef286933f49 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/thecasualdev17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ce1c30a78774ee80172c349bf0240ef286933f49 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dictionary_parser-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dictionary_parser-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d81e8fcf86feebe5fd5821715d07dbfdf9857c0e0e755df2d1182a14e50397d
|
|
| MD5 |
bcd07fef0da1ed14fefc8d1865ea762a
|
|
| BLAKE2b-256 |
3e24cae95f6d14bc490ee9891a3e4617b3fbe1425024542567f1c43c9f9cad0e
|
Provenance
The following attestation bundles were made for dictionary_parser-0.3.0-py3-none-any.whl:
Publisher:
python-publish.yml on thecasualdev17/dictionary-parser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dictionary_parser-0.3.0-py3-none-any.whl -
Subject digest:
8d81e8fcf86feebe5fd5821715d07dbfdf9857c0e0e755df2d1182a14e50397d - Sigstore transparency entry: 201496219
- Sigstore integration time:
-
Permalink:
thecasualdev17/dictionary-parser@ce1c30a78774ee80172c349bf0240ef286933f49 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/thecasualdev17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ce1c30a78774ee80172c349bf0240ef286933f49 -
Trigger Event:
release
-
Statement type: