build(sdlc): seed data, figures and rendered package for 23/09 feedback

This commit is contained in:
Thanakorn
2026-09-24 09:19:05 +07:00
parent 6c1d66d8de
commit be020e332b
146 changed files with 788 additions and 313 deletions
+9 -5
View File
@@ -188,15 +188,19 @@ LOGO_MIN_PX = 100
def strip_logo_images(document):
"""Drop the letterhead logo left loose in the body.
The work products carry no figures of their own, but the converter draws
each bullet as a small image, so only the logo is removed - anything that
size would be furniture, anything smaller is a list marker.
The converter draws each bullet as a small image, so only the logo is
removed: it is square and at least LOGO_MIN_PX, whereas anything smaller is
a list marker. The Software Design figures are wider than they are tall,
so they are kept.
"""
def is_logo(image):
width, height = image.px_width, image.px_height
return max(width, height) >= LOGO_MIN_PX and 0.8 <= width / max(height, 1) <= 1.25
logos = {
relationship_id
for relationship_id, part in document.part.related_parts.items()
if getattr(part, 'image', None) is not None
and max(part.image.px_width, part.image.px_height) >= LOGO_MIN_PX
if getattr(part, 'image', None) is not None and is_logo(part.image)
}
removed = 0