gardiner2unicode: Mapping Egyptian Hieroglyphs
A Python 3.9+ package that
- provides a convenient out-of-the-box way to access the mapping of Gardiner's Sign List codes to unicode IDs;
- generates hieroglyphs as images.
A list of hieroglyphs was copied from this Wikipedia template.
A 2.06 version of NewGardiner font is used by default. Please note that since 2.05 its license is OFL 1.1.
One can use any other font with UnicodeGlyphGenerator.
Installation
pip install -U gardiner2unicode
Breaking changes in 1.0.0
UnicodeGlyphGenerator(bkgr_color=...)->UnicodeGlyphGenerator(fill_color=...)(the argument is the text fill colour; the old name was misleading).GardinerToUnicodeMap.to_gardiner_from_hex(hex=...)->to_gardiner_from_hex(hex_code=...)(the previous name shadowed the built-inhex).GardinerToUnicodeMapnow precomputes all derived lookup tables at construction time, so everyto_*method is an O(1) dictionary access (no@lru_cache, no per-callint(..., 16)/chr(...)).- Minimum supported Python is now 3.9.
Usage example
from gardiner2unicode import GardinerToUnicodeMap, UnicodeGlyphGenerator
g2u = GardinerToUnicodeMap()
print(g2u.to_unicode_hex("A1"))
ugg = UnicodeGlyphGenerator()
ugg.generate_image("𓉓", save_path_png="O3_image.png")
Output:
00013000
How to cite
Please cite this repository if you use this work in your research.
@misc{gardiner2unicode2021alekseev,
title = {{alexeyev/gardiner2unicode: Mapping Egyptian Hieroglyphs}},
author = {Anton Alekseev},
year = {2021},
url = {https://github.com/alexeyev/gardiner2unicode},
language = {english},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/alexeyev/gardiner2unicode/}},
}
Development
Install the package together with the development dependencies and run the linter and the test suite:
pip install -e ".[dev]"
ruff check .
pytest
pytest is configured (see pyproject.toml) to also produce a coverage report.
Links
Metadata
Release files for gardiner2unicode 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gardiner2unicode-1.0.0.tar.gz | 378.5 kB | Without provenance | Details for gardiner2unicode-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gardiner2unicode-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for gardiner2unicode-1.0.0-py3-none-any.whl |
Total release size: 754.0 kB
Release files / gardiner2unicode-1.0.0.tar.gz
| Download URL | gardiner2unicode-1.0.0.tar.gz |
|---|---|
| Size | 378.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b05807a6d30d9ba8ab9e02293cba7751c5595f4cb2c12a6bf614dfd9c7519c54
|
|
BLAKE2b-256 checksum How to use checksums |
b562beaa95ab62b7a35cfed091672c9be56086b834e56d612674db752bf8bcc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Release files / gardiner2unicode-1.0.0-py3-none-any.whl
| Download URL | gardiner2unicode-1.0.0-py3-none-any.whl |
|---|---|
| Size | 375.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1b7ad20414fed2d96dbc5f878f3a1139350408d499ee236bbdd4b2c4d68344d
|
|
BLAKE2b-256 checksum How to use checksums |
7756063c430af14ba066c8e5be3b85f11a350264bf8c41d77ef62cb605405ee0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Security for gardiner2unicode 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.