Files
apocalypse/utils/dummy_user.py
woznic_n 177d8777c1
All checks were successful
Run apocalypse tests / Explore-Gitea-Actions (push) Successful in 10s
first commit
2025-09-08 18:53:14 +02:00

30 lines
651 B
Python
Executable File

#!/usr/bin/python3
import argparse
import re
from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument(
"--input",
"-i",
type=lambda p: Path(p).absolute(),
required=True,
help="path for the file, provided automatically by the apocalypse"
)
args = parser.parse_args()
pth = args.input
pth_meta = Path(str(pth).replace("/raw/", "/res/processed/").replace("/data/ac", "/meta/ac"))
acq = re.search(r"acq(\d+)", str(pth)).group(1)
pth_meta = pth_meta.with_name(f"apo_acq{acq}.txt")
pth_meta.parent.mkdir(parents=True, exist_ok=True)
with open(pth_meta, "w") as f:
f.write("test")
print(args.input)