- Shell 100%
- Fixes alopez/meikaku-explorer#4: Draw self-loop edges using CANVAS_PAINTER.arc. - Position loop circle centers outside the center node along distributed angles. - Label self-loop edges at their outer points with consistent text styling. |
||
|---|---|---|
| scripts | ||
| .gitignore | ||
| explorer_app.mei | ||
| main.mei | ||
| meikaku.json | ||
| README.md | ||
Meikaku Graph Explorer
A native desktop graph explorer for AsanagiDB, written in
Meikaku. It's the Meikaku 1.0 model app
(see docs/design/model-app.md in the Meikaku repo).
Connect to an AsanagiDB server, pick a database, search vertices or browse by label, and walk the graph: the selected vertex sits in the centre with its neighbours on a circle around it. Read-only.
Requirements
-
Meikaku's compiler
mkc(build it withzig buildin the Meikaku repo). -
The AsanagiDB Meikaku driver package (
asanadb/resources/meikaku/asanagidb-document), declared inmeikaku.json. The default path assumes this layout:~/Work/Meikaku/explorer (this project) ~/Work/Zig/asanadb (AsanagiDB)For another layout, edit
drivers.asanagidbinmeikaku.jsonor setMEIKAKU_DRIVER_ASANAGIDBto the package directory. -
An AsanagiDB server, by default
127.0.0.1:8080.
Run
mkc -r main.mei
(Use the Meikaku repo's build, ~/Work/Zig/meikaku/zig-out/bin/mkc. An older mkc on your PATH may not compile current code.)
Build an executable
mkc main.mei -O -o bin/graph-explorer # optimized; drop -O for a debug build
bin/graph-explorer
The result is a single native binary (about 1 MB optimized) with libui and the AsanagiDB driver built in; it only needs the operating system's own libraries.
Self-test
scripts/selftest.sh opens the window, drives a redraw, a click and back/forward
navigation, then closes. It exits non-zero if the app doesn't finish cleanly.
On a machine without a display, run it under xvfb-run -a.