Add the metadata file path for easy copy+paste

This commit is contained in:
Kylian Schmidt
2025-07-29 11:18:03 +02:00
parent bcb083bbb9
commit fc4928fef1
5 changed files with 243 additions and 8 deletions
+10 -5
View File
@@ -27,7 +27,8 @@ from orchestration.metadata import (
load_folder_metadata,
merge_metadata,
resolve_metadata_for_plot,
save_metadata_cache
save_metadata_cache,
get_metadata_file_path
)
@@ -73,7 +74,7 @@ def convert_pdf_to_png(pdf_path: Path) -> None:
else:
print(f"PDF {pdf_path.name} is newer than PNG, reconverting...")
print(f"Converting {pdf_path}{png_path}")
print(f"Converting\n\t{pdf_path}\n {png_path}")
subprocess.run([
"convert",
"-density", str(CONFIG.png_dpi),
@@ -143,7 +144,7 @@ def build_gallery(source_dir: Path, web_dir: Path,
web_png = web_dir / png_file.name
if needs_update(pdf_file, web_pdf):
print(f"Copying {pdf_file} to {web_pdf}")
print(f"Copying\n\t{pdf_file}\n {web_pdf}")
shutil.copy2(pdf_file, web_pdf)
else:
print(f"Skipping {pdf_file.name} (up to date)")
@@ -229,7 +230,9 @@ def build_gallery(source_dir: Path, web_dir: Path,
ui=CONFIG.ui,
stats=stats,
folder_metadata=current_metadata,
assets_path=assets_path
assets_path=assets_path,
source_dir=str(source_dir),
metadata_file_path=get_metadata_file_path(source_dir)
)
f.write(rendered_html)
@@ -409,7 +412,9 @@ def main(clean_first: bool = False) -> None:
ui=CONFIG.ui,
stats=stats,
folder_metadata={},
assets_path=assets_path
assets_path=assets_path,
source_dir=str(source_path.parent),
metadata_file_path=get_metadata_file_path(source_path.parent)
))
print(f"Generated {output_html}")