15 lines
392 B
Python
15 lines
392 B
Python
from pathlib import Path
|
|
import os
|
|
import shutil
|
|
|
|
source_dir: str = "forgejo-aneksajo"
|
|
|
|
with open("individuals.txt","r") as file_handle:
|
|
data = file_handle.readlines()
|
|
|
|
for file in data:
|
|
file = file[:-1]
|
|
basedir = os.path.dirname(file)
|
|
if len(basedir) > 0:
|
|
os.makedirs(f"export/{basedir}", exist_ok=True)
|
|
shutil.copy2(f"{source_dir}/{file}", f"export/{file}")
|