Skip to main content

Converting American English to British English

Project description

uwotm8

Release Build status codecov Commit activity License

Converting American English to British English - a tool to automatically convert American English spelling to British English spelling in your text and code files.

Installation

pip install uwotm8

Quick Start

Convert a single file:

uwotm8 example.txt

Convert only comments and docstrings in Python files:

uwotm8 --comments-only my_script.py

Read from stdin and write to stdout:

echo "I love the color gray." | uwotm8
# Output: "I love the colour grey."

Use in Python code:

from uwotm8 import convert_american_to_british_spelling

en_gb_str = convert_american_to_british_spelling("Our American neighbors' dialog can be a bit off-color.")
print(en_gb_str)
# Output: "Our American neighbours' dialogue can be a bit off-colour."

Features

  • Converts common American English spellings to British English
  • Preserves words in special contexts (code blocks, URLs, hyphenated terms)
  • Maintains an ignore list of technical terms that shouldn't be converted
  • Preserves original capitalization patterns
  • Supports Python file mode to convert only comments and docstrings, leaving code unchanged

For full documentation, examples, and advanced usage, please visit the documentation site.


Repository initiated with fpgmaas/cookiecutter-poetry.

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

uwotm8-0.1.4.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

uwotm8-0.1.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file uwotm8-0.1.4.tar.gz.

File metadata

  • Download URL: uwotm8-0.1.4.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for uwotm8-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a3e5b86d69517a8f0ca025e5e33ae12348490179e464368ad6f6780637de6880
MD5 5042ea8ea566343ee77b9fa3aa6a0628
BLAKE2b-256 28f0fda0a8083dca2eab50ac0e7a8871d9f67b2e68b11309e59a6ef919e3b77c

See more details on using hashes here.

File details

Details for the file uwotm8-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: uwotm8-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for uwotm8-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cb323a7b21c17629a9c1bad9aebdf2b29b0bc09ed7316ed50d002e3e9ea09ae9
MD5 8c5e184422204df7b4dd69f9b3dd95a9
BLAKE2b-256 667610be55438f2c61570a5b6dddf30bf28bd3ef594577c737ee1cfe747253fe

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