BaseHangul
Human-readable binary encoding, BaseHangul for Python.
BaseHangul is an binary encoder using hangul. You can see the specification of it.
Installation
To install it just run pip as usual:
$ pip install basehangul
Usage
import basehangul
basehangul.encode('This is an encoded string')
# => '๋ฅ๋ผ๋๋จ๋ด๋ฉฅ๊ฐฏ๋๊ถ๋๋ฐธ๋ฎค๋ด๋๋๊ตก๋๋ฉ๋๋ค'
basehangul.decode(u'๋ฅ๋ผ๋๋จ๋ด๋ฉฅ๊ฐฏ๋๊ถ๋๋ฐธ๋ฎค๋ด๋๋๊ตก๋๋ฉ๋๋ค')
# => 'This is an encoded string'
Testing
For running the tests, you need the standard unittest module, shipped with Python.
To run them, use either py.test, unittest or trial.
To run the tests:
$ nosetests
Contributing
- Fork it (https://github.com/ssut/basehangul/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
Copyright ยฉ SuHun Han. See LICENSE.txt for further details.