No project description provided
Project description
unicodedata-reader
This package reads and parses the Unicode Character Database files.
Many of them are available in the unicodedata module, or in other 3rd party modules. When the desired data is not in any existing modules, such as the Line_Break property or the Vertical_Orientation property, this package can read the data files at https://www.unicode.org/Public/UNIDATA/.
This package can also generate JavaScript functions that can read the property values of the Unicode Character Database in browsers. Please see the JavaScript section below.
Install
pip install unicodedata-reader
If you want to clone and install using poetry:
git clone https://github.com/kojiishi/unicodedata-reader
cd unicodedata-reader
poetry install
poetry shell
Python
import unicodedata_reader
reader = unicodedata_reader.UnicodeDataReader.default
lb = reader.line_break()
print(lb.value(0x41))
The example above prints AL
,
the Line_Break property value for U+0041.
Please also see line_break_test.py for more usages.
JavaScript
The UnicodeDataCompressor
class in this package
can generate JavaScript functions that can read the property values
of the Unicode Character Database in browsers.
Following examples are available in the "js
" directory:
- GeneralCategory.js is a generated JavaScript file for the Unicode General_Category property.
- LineBreak.js is a generated JavaScript file for the Unicode Line_Break property.
- LineBreak.html for an example usage of LineBreak.js.
The following command generates a JavaScript file for the Line_Break property
using js/template.js
as the template file:
unicodedata-reader lb -t js/template.js
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for unicodedata_reader-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5206fa020ea5cf7a730e40f159c4e0fcfffb04161c2eb98ceba9aaad37c85ac |
|
MD5 | e00ba07b6c4dd1c42705d91fe6730e51 |
|
BLAKE2b-256 | c17f0acef4149e7e619cf12e878e642c87d6c35dc0212d4dfe9bd684407bc672 |