A Python package for converting text substitution files between different formats.
Project description
Pysubstitutor
Description
pysubstitutor is a Python package designed to convert text substitution files between different formats. It supports reading and exporting text substitutions in formats such as Apple .plist, Gboard .gboard, and Markdown .md. The package is modular, extensible, and includes utilities for handling file conversions and zipping output files.
This tool is particularly useful for managing and migrating text substitution dictionaries across platforms or exporting them for documentation purposes.
Features
- Plist to Gboard Conversion: Convert Apple
.plistfiles to Gboard.gboardformat. - Markdown Export: Export text substitutions to a Markdown table for easy documentation.
- Extensible Handlers: Easily add support for new file formats by implementing custom handlers.
- Command-Line Interface: Run the tool via the command line with customizable input and output paths.
- Dockerized Environment: Run the application and tests in a Docker container for consistency.
Installation
Using Conda
-
Create the conda environment:
conda env create -f environment.yml
-
Activate the environment:
conda activate pysubstitutor
-
Install pre-commit hooks:
pre-commit install
Using Docker
-
Build the Docker image:
make build -
Verify the Docker image is built:
docker images
Testing
Run the tests inside the Conda environment:
pytest tests
Or, run the tests inside the Docker container:
make test
Execution
Run the application inside the Docker container:
make run
Replace the --input and --output arguments in the Makefile if you need to customize the input and output file paths.
Project details
Release history Release notifications | RSS feed
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 pysubstitutor-1.0.2.tar.gz.
File metadata
- Download URL: pysubstitutor-1.0.2.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29353663db5fe4c86f82bccdac1cb75a938efab38adcea0f54dc8c82b262fb0
|
|
| MD5 |
6bd2f7482c952765adfb45eba98afa38
|
|
| BLAKE2b-256 |
2a3ca845a2830d8be96e6a6631aab7ae99e2d816cdd57bda07f05ff1ef621092
|
File details
Details for the file pysubstitutor-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pysubstitutor-1.0.2-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b342685b458b631bba0152e297c3abeea8a497bab2d0a89214dd6137db385059
|
|
| MD5 |
2ff204274a50d611988b872de7a1272e
|
|
| BLAKE2b-256 |
81ff81ced42899202fc301eded06d19de35923ad93415c6f1df29f42909e645d
|