Initial commit

This commit is contained in:
Felix Baumann
2026-06-27 17:07:34 +00:00
commit fb47c53d52
256 changed files with 21270 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env python3
from pathlib import Path
ROOT = Path("/opt/projects")
SEARCH = "<a"
EXCLUDE_DIRS = {
"venv",
"__pycache__",
".git",
"node_modules",
"media",
"staticfiles",
'base.html',
'search.py'
}
for path in ROOT.rglob("*"):
if not path.is_file():
continue
if any(part in EXCLUDE_DIRS for part in path.parts):
continue
try:
with path.open("r", encoding="utf-8") as f:
for number, line in enumerate(f, start=1):
if SEARCH in line:
print(
f"{path}:{number}: {line.rstrip()}"
)
except (UnicodeDecodeError, PermissionError):
pass