Add the metadata file path for easy copy+paste
This commit is contained in:
+10
-5
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user