Converts Greek beta code to Greek characters and vice versa
Project description
Beta Code Converter for Python
Overview
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')
# => 'μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος'
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/zfletch/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:
python3 -m pip install --user --upgrade setuptools wheel
python3 -m pip install --user --upgrade twine
- Bump version in
setup.py
- Commit and push to GitHub
- On GitHub, create a new release
- Run
python3 setup.py sdist bdist_wheel
- Run
twine upload dist/*
Notes
For the mappings between beta code and Unicode, see https://github.com/zfletch/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.
Source Distribution
beta_code-0.0.4.tar.gz
(6.7 kB
view hashes)
Built Distribution
Close
Hashes for beta_code-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9ea0a19fa3d5403fb09a6eceea4ed6b0e97f23515c791e9cc3156be2d995fa0 |
|
MD5 | dca155562cd2769ed6538db8ae4f390d |
|
BLAKE2b-256 | 2352a51e5f12e6cdc087d206433a22b7b1208f6f936c0c388aeb05334661a9db |