Skip to main content

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 .plist files to Gboard .gboard format.
  • 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

  1. Create the conda environment:

    conda env create -f environment.yml
    
  2. Activate the environment:

    conda activate pysubstitutor
    
  3. Install pre-commit hooks:

    pre-commit install
    

Using Docker

  1. Build the Docker image:

    make build
    
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysubstitutor-1.0.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysubstitutor-1.0.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

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

Hashes for pysubstitutor-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f29353663db5fe4c86f82bccdac1cb75a938efab38adcea0f54dc8c82b262fb0
MD5 6bd2f7482c952765adfb45eba98afa38
BLAKE2b-256 2a3ca845a2830d8be96e6a6631aab7ae99e2d816cdd57bda07f05ff1ef621092

See more details on using hashes here.

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

Hashes for pysubstitutor-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b342685b458b631bba0152e297c3abeea8a497bab2d0a89214dd6137db385059
MD5 2ff204274a50d611988b872de7a1272e
BLAKE2b-256 81ff81ced42899202fc301eded06d19de35923ad93415c6f1df29f42909e645d

See more details on using hashes here.

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