You've already forked etude_lego_jurassic_world
Affiche le part_num sur les frises de têtes
This commit is contained in:
@@ -58,6 +58,7 @@ def build_character_collage(
|
||||
font: ImageFont.ImageFont,
|
||||
missing_paths: Set[str] | None = None,
|
||||
image_filename: str = "minifig.jpg",
|
||||
label_field: str = "fig_num",
|
||||
image_height: int = 260,
|
||||
label_height: int = 44,
|
||||
spacing: int = 28,
|
||||
@@ -69,7 +70,8 @@ def build_character_collage(
|
||||
for row in entries:
|
||||
image_path = resources_dir / row["set_id"] / sanitized / image_filename
|
||||
owned = "*" if row.get("in_collection", "").lower() == "true" else ""
|
||||
label = f"{row['year']} - {row['set_num']}{owned} ({row['fig_num']})"
|
||||
label_value = row[label_field]
|
||||
label = f"{row['year']} - {row['set_num']}{owned} ({label_value})"
|
||||
if str(image_path) in missing:
|
||||
image = build_placeholder(image_height)
|
||||
else:
|
||||
@@ -94,6 +96,7 @@ def build_character_collages(
|
||||
destination_dir: Path,
|
||||
missing_paths: Set[str] | None = None,
|
||||
image_filename: str = "minifig.jpg",
|
||||
label_field: str = "fig_num",
|
||||
image_height: int = 260,
|
||||
label_height: int = 44,
|
||||
spacing: int = 28,
|
||||
@@ -111,6 +114,7 @@ def build_character_collages(
|
||||
font,
|
||||
missing_paths=missing_paths,
|
||||
image_filename=image_filename,
|
||||
label_field=label_field,
|
||||
image_height=image_height,
|
||||
label_height=label_height,
|
||||
spacing=spacing,
|
||||
|
||||
Reference in New Issue
Block a user