Kanji Stroke Order Study Tool
Project description
ksost
ksost stands for Kanji Stroke Order Study Tool. It is a small web application for studying kanji stroke order, written in Python and plain JavaScript.
The server has no runtime Python or JavaScript package dependencies, but there are some dependencies for development and to run the desktop wrapper, as well as some setup steps required to run from source. See Running, Desktop Wrapper and Development.
Dependencies
- Python >= 3.14
- SQLite3
- optional Qt for desktop wrapper
Running
First initialize the dataset submodules. You can use git submodule for that,
but prefer the make bootstrap target, which will also prepare the environment
in other ways (see make targets):
make bootstrap
Then activate the venv and start the server using the command installed in it, or call the commands using the venv explicitly:
# Activating the venv
. .venv/bin/activate
ksost
# Without activating the venv
.venv/bin/ksost
# Or
.venv/bin/python -m ksost
These commands start the built-in HTTP server and initialize the configured SQLite database if needed.
If you want to initialize the database explicitly, you can also run:
ksost init-db
Desktop Wrapper
To run the desktop wrapper you need Qt installed on your system beforehand. The
Python-level desktop dependencies are defined in
pyproject.toml, and you can install them to your venv
manually or with:
make desktop
Then run with:
ksost desktop
Configuration
Runtime configuration lives in ksost.toml. ksost looks for that file in
this order, using only the first file it finds:
- the current working directory
~/.config/ksost/
An example commented file is provided at
ksost.toml.example.
Development
For development, create a virtual environment and install the dev
optional-dependency group from pyproject.toml.
You can do that manually, or use the make target:
make dev
This also creates an untracked local override file at
ksost/frontend/pwa.local.js if it does not
exist yet. By default it keeps the normal PWA behavior:
export const PWA_ENABLED = true;
For local frontend testing, you can change that to false, which disables the service-worker/PWA behavior, making testing easier when you're constantly changing the static files.
To run the checks:
./scripts/check.sh && ./scripts/test.sh
make targets
You can see in Makefile the complete list of targets. In addition to the actual file targets, there are phony targets that group targets in useful functional groups. The top-level targets are:
- Bootstrap targets:
bootstrap- Includes
submodules, which initializesgitsubmodules - Includes
data, which copies important files from submodules to the paths where the application expects them - Includes
venv, which creates the Python virtual environment in.venv
- Includes
dev- Includes
bootstrap - Includes
overrides, which creates the PWA override mentioned in Development - Installs the Python extra development dependencies from pyproject.toml
- Includes
desktop- Includes
bootstrap - Installs the Python extra desktop dependencies from pyproject.toml
- Includes
- Packaging targets:
arch- Depends on the Python package artifacts, see below
- Updates the
PKGBUILDsource hash - Generates
.SRCINFO - Runs
makepkg -sto package for Arch Linux - Must be run outside an active Python venv
python- Creates both the python wheel and sdist packages, with our best effort to make both builds reproducible
- Refuses to build when the git worktree has unstaged or untracked changes
- Use
make ALLOW_DIRTY=1 pythonto bypass
clean-dist- Remove all generated artifacts in
dist/
- Remove all generated artifacts in
License
ksost itself is licensed under MIT. This repository also includes third-party datasets under their own licenses. See LICENSE for the exact boundary and the referenced third-party license files.
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 ksost-11.tar.gz.
File metadata
- Download URL: ksost-11.tar.gz
- Upload date:
- Size: 21.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d15289954797f9cadb083d7504dfea76f12f581f4d1f17778d267b1c2d169c83
|
|
| MD5 |
c2640f761e4f623afc2c8845cd645775
|
|
| BLAKE2b-256 |
2a8053752f130f23a7d7eb40f830acc887a4c6787d5bb3bca5ca5fef42fbecf1
|
File details
Details for the file ksost-11-py3-none-any.whl.
File metadata
- Download URL: ksost-11-py3-none-any.whl
- Upload date:
- Size: 21.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86bcfcdef27caebfea8bef9989c3d5262e554dde75c07c060f1203b78f6a832d
|
|
| MD5 |
724b08d541daa1a7a4483b18968a38cf
|
|
| BLAKE2b-256 |
5e936c245059bdf8c460b32731731e796597941afaa60ef8b61d5cfb507bcf70
|