added base project

This commit is contained in:
2025-04-19 16:52:03 -04:00
parent 60eafe0ddb
commit 32fe80859b
41 changed files with 1615 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
from pathlib import Path, PurePosixPath
import zipfile, fnmatch
ROOT = Path.cwd()
zip_path = ROOT / "report_overleaf.zip"
exclude = ['*.aux', '*.log', '*.out', '*.pdf', '*.zip', '*.pyc',
'__pycache__', '.git*', '*.DS_Store']
def include(path: Path) -> bool:
rel = path.relative_to(ROOT)
return not any(fnmatch.fnmatch(rel.as_posix(), pat) for pat in exclude)
with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zf:
for p in ROOT.rglob('*'):
if p.is_file() and include(p):
zf.write(p, arcname=PurePosixPath(p.relative_to(ROOT)))
print("archive saved to", zip_path)