Python tools for Sutton SignWriting core functionality.
Project description
sutton-signwriting-core
sutton-signwriting-core is a Python library that supports general processing of SignWriting text
This library supports both Formal SignWriting in ASCII (FSW) and SignWriting in Unicode (SWU) character sets, , along with the associated query languages and style string. See draft-slevinski-formal-signwriting for detailed specification.
Author: Steve Slevinski
Channel: YouTube
Support: Patreon
Donate: sutton-signwriting.io
Useful Links
- Source: GitHub
- PyPI: pypi.org/project/sutton-signwriting-core
- Documentation: sutton-signwriting.io/core-py
- Issues: GitHub Issues
- Discussion: Gitter
Installation
pip install sutton-signwriting-core
Usage
from sutton_signwriting_core import (
fsw_is_type, fsw_parse_symbol,
fsw_to_coord, key_to_id
)
# FSW is type
fsw_is_type('S10000', 'hand')
True
# FSW parse symbol
fsw_parse_symbol('S10000500x500-C')
{'symbol': 'S10000', 'coord': [500, 500], 'style': '-C'}
# FSW to coord
fsw_to_coord('500x500')
[500, 500]
# FSW symbol key to 16-bit ID
key_to_id('S10000')
1
All functions are fully typed, validated, and documented with Python-style docstrings (Google format). Run help(swu_to_fsw) for details.
Development
NOTE: for documentation in PDF and EPUB
sudo apt install latexmk
Development Steps
# 1. Clone the repo
git clone https://github.com/sutton-signwriting/core-py.git
cd core-py
# 2. Install Poetry (if you don’t have it)
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
# 3. Create the virtual environment and install deps
poetry install
# 4. Activate the environment (Poetry 2+)
poetry env activate
# (copy and execute the returned command)
# 5. Run the test suite
pytest -v
# 6. Code coverage and HTML report
pytest --cov
pytest -v --cov=sutton_signwriting_core --cov-report=html
pytest --cov=sutton_signwriting_core --cov-report=xml
# 7. Lint / format / type-check
black .
ruff check .
mypy src
# 8. Create HTML documentation
cd sphinx-docs
sphinx-build -b html source/ ../docs/
# 9. Build distributions
poetry build
# 10. Publish to pypi
poetry publish --build
License
MIT – see LICENSE for details.
Maintained by Steve Slevinski – Slevinski@signwriting.org
SignWriting Resources
- Website: signwriting.org
- Resources: sutton-signwriting.io
- Wikipedia: SignWriting
- Grokipedia SignWriting
- Forum: swlist
- Facebook: Sutton SignWriting Group
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sutton_signwriting_core-1.0.0.tar.gz.
File metadata
- Download URL: sutton_signwriting_core-1.0.0.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.12 Linux/6.6.87.2-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03b3cb872edd234bdd94aa16e4e615bfdebcfb21c9ad62429f0c044f0001a58
|
|
| MD5 |
ddecd140fc978b5cbfbb417b037363b1
|
|
| BLAKE2b-256 |
5a1cf4ed6cfb4d230e472974a7947beb42d6a5cd46d1776520381e4c707b0a2a
|
File details
Details for the file sutton_signwriting_core-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sutton_signwriting_core-1.0.0-py3-none-any.whl
- Upload date:
- Size: 40.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.12 Linux/6.6.87.2-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
157a6157b6edea2f1d56c0bd0b1757e2b4f054e2a07625cdff3ff0520156138b
|
|
| MD5 |
ec885b77f20591314cf8061c431922e5
|
|
| BLAKE2b-256 |
d2642a28d6a4998edce848a129ae705448278f047ddac08da7699cdd47e9d09a
|