Skip to main content

Converts Greek Beta Code to Greek characters and vice versa

Project description

Beta Code Converter for Python

Converts Greek Beta Code to Greek characters and vice versa.

Installation

pip install beta-code

Usage

import beta_code

beta_code.greek_to_beta_code('χαῖρε ὦ κόσμε')
# => 'xai=re w)= ko/sme'

beta_code.beta_code_to_greek('mh=nin a)/eide qea\\ *phlhi+a/dew *)axilh=os')
# => 'μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος'

(See project on PyPI)

Tests

python -m unittest tests/test_beta_code.py

In Python 2

cd tests/ && python -m unittest test_beta_code

Updating JSON

git subtree pull --prefix beta_code/vendor/beta-code-json/ https://github.com/perseids-tools/beta-code-json master --squash

In the case of a merge conflict:

git checkout --theirs vendor/beta-code-json/
git add vendor/beta-code-json
git commit

Publishing

  • Install dependencies:
pip install -r requirements.txt
  • Bump version in setup.py
  • Commit and push to GitHub
  • On GitHub, create a new release
  • Run python3 setup.py sdist bdist_wheel
  • Run python3 -m twine upload dist/*

Notes

For the mappings between Beta Code and Unicode, see https://github.com/perseids-tools/beta-code-json.

Project details


Download files

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

Files for beta-code, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size beta_code-0.1.0-py3-none-any.whl (8.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size beta_code-0.1.0.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page