From b41e5288d7b8839b1ce0448489c365b243a8d00d Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Tue, 6 Oct 2026 14:06:51 +1300 Subject: agentic --- backend.py | 6 ++++++ main.py | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/backend.py b/backend.py index b0d9588..284dc02 100644 --- a/backend.py +++ b/backend.py @@ -30,6 +30,12 @@ def hack_this_club(): os.system('lp -d Canon_G3060 /opsec.txt') return "ok" +@app.get("/automate/agentic") +def agentic(): + print("That's so agentic.") + os.system('lp -d Canon_G3060 /srv/shares/public/thats-so-agentic.png') + return "ok" + @app.get("/automate/print_queue") def print_queue(): if not print_lock.acquire(blocking=False): diff --git a/main.py b/main.py index 3bd1fe1..c8d1e67 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,7 @@ from evdev import InputDevice, list_devices, ecodes from urllib.request import urlopen from urllib.error import HTTPError, URLError -SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-", 0x101: "app", 0x154: "1", 0x110: "stop", 0x14b: "skip", 0x155: "epg", 0x119: "web", 0x15f: "setting"} +SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-", 0x101: "app", 0x154: "1", 0x110: "stop", 0x14b: "skip", 0x155: "epg", 0x119: "web", 0x15f: "setting", 0x15a: "dtv"} device = None last = 0x00 @@ -43,6 +43,8 @@ def do_action(action: str): homelab_request("zola") elif action == "setting": homelab_request("cgit") + elif action == "dtv": + homelab_request("agentic") for path in list_devices(): candidate = InputDevice(path) -- cgit v1.2.3