Add keymap-drawer workflow

I haven't tuned the output. For now this is just a demonstration of the
workflow.
This commit is contained in:
urob 2024-08-13 16:04:48 -04:00
parent c65ef715d9
commit 63222cc2dd
8 changed files with 32 additions and 3 deletions

8
draw/config.yaml Normal file
View file

@ -0,0 +1,8 @@
parse_config:
zmk_preamble: "#include <zmk-helpers/key-labels/34.h>"
zmk_additional_includes:
- "modules/helpers/include"
draw_config:
footer_text: "urob/zmk-config"
dark_mode: auto

46
draw/default.nix Normal file
View file

@ -0,0 +1,46 @@
{
lib,
buildPythonApplication,
fetchPypi,
poetry-core,
pydantic,
pcpp,
pyparsing,
pyyaml,
platformdirs,
pydantic-settings,
}:
buildPythonApplication rec {
pname = "keymap-drawer";
version = "0.18.0";
pyproject = true;
src = fetchPypi {
pname = "keymap_drawer";
inherit version;
hash = "sha256-faJB+cjj740Ny2wqVwc5t/+grEWBIEyhex3RoLCuIs8=";
};
postPatch = ''
substituteInPlace pyproject.toml --replace 'platformdirs = "^3.5.1"' 'platformdirs = "^4.0.0"'
'';
build-system = [poetry-core];
propagatedBuildInputs = [
pydantic
pcpp
pyparsing
pyyaml
platformdirs
pydantic-settings
];
doCheck = false;
meta = {
homepage = "https://github.com/caksoylar/keymap-drawer";
description = "Parse QMK & ZMK keymaps and draw them as vector graphics";
license = lib.licenses.mit;
};
}

BIN
draw/keymap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB