Initial commit: organize Primary song slides repo

One folder per song under songs/. Tracks PPTX slide files and
Python generation scripts. PDFs and videos excluded (too large
for git; originals are in Google Drive).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 21:20:22 -06:00
commit 5a45320057
17 changed files with 788 additions and 0 deletions
@@ -0,0 +1,55 @@
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
from reportlab.lib.units import inch
from reportlab.pdfbase.pdfmetrics import stringWidth
OUT_PATH = r"C:\Users\jhodgkin\Pictures\Dearest Mother I Love You - Initials.pdf"
LINES = [
"Gentle words I hear you say.",
"Your kind hands help me each day.",
"You're my mother kind and true;",
"Dearest mother, I love you.",
]
W, H = letter
MARGIN = 0.5 * inch
FONT = "Helvetica-Bold"
def first_letters(line):
return " ".join(word[0].upper() for word in line.split())
def fit_font_size(c, text, max_width, start=200):
size = start
while size > 1:
if stringWidth(text, FONT, size) <= max_width:
return size
size -= 1
return size
def make_pdf():
c = canvas.Canvas(OUT_PATH, pagesize=letter)
initials = [first_letters(line) for line in LINES]
max_w = W - 2 * MARGIN
# Find a single font size that fits all lines
size = min(fit_font_size(c, line, max_w) for line in initials)
# Distribute lines evenly across the page height
usable_h = H - 2 * MARGIN
slot = usable_h / len(initials)
for i, text in enumerate(initials):
# Center vertically within each slot
y = H - MARGIN - (i + 0.65) * slot
c.setFont(FONT, size)
c.drawCentredString(W / 2, y, text)
c.save()
print(f"Saved: {OUT_PATH}")
print(f"Font size: {size}pt")
for line, init in zip(LINES, initials):
print(f" {line!r} -> {init!r}")
make_pdf()
@@ -0,0 +1,82 @@
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
from reportlab.lib.colors import HexColor
from reportlab.lib.units import inch
OUT_PATH = r"C:\Users\jhodgkin\Pictures\Dearest Mother I Love You.pdf"
LINES = [
"Gentle words I hear you say.",
"Your kind hands help me each day.",
"Youre my mother kind and true;",
"Dearest mother, I love you.",
]
TITLE = "Dearest Mother, I Love You"
W, H = letter # 8.5 x 11 inches
PINK = HexColor("#F48FB1")
SOFT_PINK = HexColor("#FCE4EC")
DEEP_ROSE = HexColor("#C2185B")
GOLD = HexColor("#F9A825")
def draw_flower(c, cx, cy, r=18, petals=6, petal_color=None, center_color=None):
import math
petal_color = petal_color or PINK
center_color = center_color or GOLD
for i in range(petals):
angle = math.radians(i * 360 / petals)
px = cx + math.cos(angle) * r * 1.1
py = cy + math.sin(angle) * r * 1.1
c.setFillColor(petal_color)
c.circle(px, py, r * 0.65, fill=1, stroke=0)
c.setFillColor(center_color)
c.circle(cx, cy, r * 0.45, fill=1, stroke=0)
def make_pdf():
c = canvas.Canvas(OUT_PATH, pagesize=letter)
# Corner flowers
corners = [
(0.65*inch, 0.65*inch),
(W - 0.65*inch, 0.65*inch),
(0.65*inch, H - 0.65*inch),
(W - 0.65*inch, H - 0.65*inch),
]
for cx, cy in corners:
draw_flower(c, cx, cy)
# Title
c.setFillColor(DEEP_ROSE)
c.setFont("Helvetica-BoldOblique", 28)
c.drawCentredString(W / 2, H - 1.5*inch, TITLE)
# Divider line under title
c.setStrokeColor(PINK)
c.setLineWidth(2)
c.line(1.2*inch, H - 1.75*inch, W - 1.2*inch, H - 1.75*inch)
# Lyrics — evenly spaced
c.setFillColor(HexColor("#4A148C"))
c.setFont("Helvetica-Bold", 26)
top = H - 2.4*inch
spacing = 1.0*inch
for i, line in enumerate(LINES):
y = top - i * spacing
c.drawCentredString(W / 2, y, line)
# Small decorative flowers between lines
for i in range(len(LINES) - 1):
y = top - i * spacing - spacing / 2
draw_flower(c, W / 2, y, r=8)
# Footer
c.setFillColor(DEEP_ROSE)
c.setFont("Helvetica-Oblique", 14)
c.drawCentredString(W / 2, 0.75*inch, "Happy Mothers Day")
c.save()
print(f"Saved: {OUT_PATH}")
make_pdf()