Initial support for _F output file

This commit is contained in:
2026-04-25 09:17:48 +02:00
parent 95e944f983
commit d7a8e03d2c
4 changed files with 106 additions and 15 deletions
+8
View File
@@ -2,6 +2,7 @@ import argparse
import math
import sys
import os
import shutil
from pathlib import Path
import pandas as pd
from PIL import Image, ImageDraw, ImageFont
@@ -96,6 +97,13 @@ def process_images(base_dir):
except Exception as e:
print(f"Error processing image for '{student_name}': {e}")
for pdf_path in sorted(search_path.glob("*/*.pdf")):
student_name = pdf_path.stem # Filename without extension
save_path = OUTPUT_DIR / f"{student_name}.pdf"
shutil.copy(str(pdf_path), str(save_path))
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Stamp scores on exam copies.")
parser.add_argument("dir", type=Path, help="Root directory containing 'A Rendre' folder")