aboutsummaryrefslogtreecommitdiff
path: root/profanity-aesgcm-watch
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-04-14 22:32:43 +0200
committerLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-04-14 22:32:43 +0200
commit83f7fe4b8402bab171d110703a1b1115efbc9b28 (patch)
tree19110702c7d740f6bd8ee4f5d2ebcb97442be237 /profanity-aesgcm-watch
parent51d43498b07dc97d795947964534f0903cd05db5 (diff)
downloadbin-83f7fe4b8402bab171d110703a1b1115efbc9b28.tar.gz
bin-83f7fe4b8402bab171d110703a1b1115efbc9b28.zip
cleaned up many scrits and deleted some that were of no use; renamed a lot
Diffstat (limited to 'profanity-aesgcm-watch')
-rwxr-xr-xprofanity-aesgcm-watch45
1 files changed, 0 insertions, 45 deletions
diff --git a/profanity-aesgcm-watch b/profanity-aesgcm-watch
deleted file mode 100755
index f4a23f9..0000000
--- a/profanity-aesgcm-watch
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python3
-
-import re
-import subprocess
-import sys
-import time
-from pathlib import Path
-
-URI_RE = re.compile(r'aesgcm://[^\s<>"\']+')
-
-if len(sys.argv) != 2:
- print("usage: profanity-aesgcm-watch /path/to/chat.log", file=sys.stderr)
- sys.exit(1)
-
-log_path = Path(sys.argv[1])
-if not log_path.exists():
- print(f"log file not found: {log_path}", file=sys.stderr)
- sys.exit(1)
-
-seen = set()
-
-with log_path.open("r", encoding="utf-8", errors="replace") as f:
- f.seek(0, 2) # start at end
-
- while True:
- line = f.readline()
- if not line:
- time.sleep(0.5)
- continue
-
- m = URI_RE.search(line)
- if not m:
- continue
-
- uri = m.group(0)
- if uri in seen:
- continue
-
- seen.add(uri)
-
- subprocess.run(
- [str(Path.home() / ".local/bin/profanity-aesgcm-handler"), uri],
- check=False,
- )
-