summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvmd/Makefile6
-rwxr-xr-xkvmd/genmap.py (renamed from hid/genmap.py)4
-rw-r--r--kvmd/hid/.gitignore (renamed from hid/.gitignore)0
-rw-r--r--kvmd/hid/Makefile (renamed from hid/Makefile)3
-rw-r--r--kvmd/hid/platformio.ini (renamed from hid/platformio.ini)0
-rw-r--r--kvmd/hid/src/inline.h (renamed from hid/src/inline.h)0
-rw-r--r--kvmd/hid/src/keymap.h (renamed from hid/src/keymap.h)0
-rw-r--r--kvmd/hid/src/main.cpp (renamed from hid/src/main.cpp)0
-rw-r--r--kvmd/keymap.in (renamed from hid/keymap.in)0
-rw-r--r--kvmd/tox.ini8
10 files changed, 12 insertions, 9 deletions
diff --git a/kvmd/Makefile b/kvmd/Makefile
index aa654735..db5c4429 100644
--- a/kvmd/Makefile
+++ b/kvmd/Makefile
@@ -40,6 +40,10 @@ shell:
make run TESTENV_CMD=/bin/bash
+regen:
+ python3 genmap.py
+
+
release:
make clean
make tox
@@ -66,7 +70,9 @@ push:
clean:
rm -rf build site dist pkg src *.egg-info kvmd-*.tar.gz
find -name __pycache__ | xargs rm -rf
+ make -C hid clean
clean-all: clean
rm -rf .tox .mypy_cache
+ make -C hid clean-all
diff --git a/hid/genmap.py b/kvmd/genmap.py
index 75a31624..f01d6077 100755
--- a/hid/genmap.py
+++ b/kvmd/genmap.py
@@ -18,13 +18,13 @@ def main() -> None:
parts = row.split()
keymap.append((int(parts[0]), parts[1], parts[2]))
- with open("../kvmd/kvmd/data/keymap.yaml", "w") as kvmd_yaml_file:
+ with open("kvmd/data/keymap.yaml", "w") as kvmd_yaml_file:
yaml.dump({
js_key: code
for (code, _, js_key) in sorted(keymap, key=operator.itemgetter(2))
}, kvmd_yaml_file, indent=4, default_flow_style=False)
- with open("src/keymap.h", "w") as hid_header_file:
+ with open("hid/src/keymap.h", "w") as hid_header_file:
hid_header_file.write("#pragma once\n\n#include <HID-Project.h>\n\n#include \"inline.h\"\n\n\n")
hid_header_file.write("INLINE KeyboardKeycode keymap(uint8_t code) {\n\tswitch(code) {\n")
for (code, hid_key, _) in sorted(keymap, key=operator.itemgetter(1)):
diff --git a/hid/.gitignore b/kvmd/hid/.gitignore
index c6d216a4..c6d216a4 100644
--- a/hid/.gitignore
+++ b/kvmd/hid/.gitignore
diff --git a/hid/Makefile b/kvmd/hid/Makefile
index edbd63f1..0d94b010 100644
--- a/hid/Makefile
+++ b/kvmd/hid/Makefile
@@ -14,8 +14,5 @@ upload:
serial:
platformio serialports monitor
-regen:
- python3 genmap.py
-
clean:
rm -rf .pioenvs .piolibdeps
diff --git a/hid/platformio.ini b/kvmd/hid/platformio.ini
index 13036b9d..13036b9d 100644
--- a/hid/platformio.ini
+++ b/kvmd/hid/platformio.ini
diff --git a/hid/src/inline.h b/kvmd/hid/src/inline.h
index 5b642a83..5b642a83 100644
--- a/hid/src/inline.h
+++ b/kvmd/hid/src/inline.h
diff --git a/hid/src/keymap.h b/kvmd/hid/src/keymap.h
index c2302601..c2302601 100644
--- a/hid/src/keymap.h
+++ b/kvmd/hid/src/keymap.h
diff --git a/hid/src/main.cpp b/kvmd/hid/src/main.cpp
index 7bfced13..7bfced13 100644
--- a/hid/src/main.cpp
+++ b/kvmd/hid/src/main.cpp
diff --git a/hid/keymap.in b/kvmd/keymap.in
index da9ddf25..da9ddf25 100644
--- a/hid/keymap.in
+++ b/kvmd/keymap.in
diff --git a/kvmd/tox.ini b/kvmd/tox.ini
index a22805d0..b99660fb 100644
--- a/kvmd/tox.ini
+++ b/kvmd/tox.ini
@@ -6,26 +6,26 @@ skipsdist = True
basepython = python3.7
[testenv:flake8]
-commands = flake8 kvmd
+commands = flake8 kvmd genmap.py
deps =
flake8
flake8-double-quotes
-rtestenv/requirements.txt
[testenv:pylint]
-commands = pylint --output-format=colorized --reports=no kvmd
+commands = pylint --output-format=colorized --reports=no kvmd genmap.py
deps =
pylint
-rtestenv/requirements.txt
[testenv:mypy]
-commands = mypy kvmd
+commands = mypy kvmd genmap.py
deps =
mypy
-rtestenv/requirements.txt
[testenv:vulture]
-commands = vulture kvmd vulture-wl.py
+commands = vulture kvmd genmap.py vulture-wl.py
deps =
vulture
-rtestenv/requirements.txt