-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregenerate.sh
More file actions
executable file
·78 lines (67 loc) · 1.91 KB
/
Copy pathregenerate.sh
File metadata and controls
executable file
·78 lines (67 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env zsh
# ============================================================
# Regenerate Natick Town Meeting Video Package
# ============================================================
# This script regenerates all video production materials from
# the source Markdown files in ~/Curriculum/.
#
# Prerequisites: python3 with python-pptx installed
# pip3 install python-pptx
#
# Usage:
# ./regenerate.sh # regenerate everything
# ./regenerate.sh --check # check source files exist only
# ============================================================
set -e
DIR="${0:A:h}"
SOURCES=(
"$DIR/references.md"
"$DIR/video_transcripts.md"
"$DIR/author.md"
"Copy of Town Government in Massachusetts Reading.txt"
)
CHECK_ONLY=0
if [[ "$1" == "--check" ]]; then
CHECK_ONLY=1
fi
echo "=== Natick Video Package Regenerator ==="
echo ""
# ---- Check sources ----
echo "Checking source files..."
for src in $SOURCES; do
if [[ -f "$src" ]]; then
echo " ✓ $src"
else
echo " ✗ MISSING: $src"
if [[ $CHECK_ONLY -eq 0 ]]; then
exit 1
fi
fi
done
if [[ $CHECK_ONLY -eq 1 ]]; then
echo ""
echo "All sources present. Ready to regenerate."
exit 0
fi
echo ""
# ---- Regenerate storyboard ----
# The storyboard is currently manually authored.
# To regenerate it from source data, run:
# python3 "$DIR/generate_storyboard.py"
# (Coming soon — see SKILL.md)
# ---- Regenerate script ----
# The script is currently manually authored.
# To regenerate it from storyboard, run:
# python3 "$DIR/generate_script.py"
# (Coming soon — see SKILL.md)
# ---- Regenerate slides ----
echo "Generating PowerPoint slides..."
python3 "$DIR/generate_slides.py"
echo ""
# ---- Done ----
echo "=== Done ==="
echo ""
echo "Generated files:"
ls -lh "$DIR"/Town_Meeting_Video_Slides.pptx "$DIR"/storyboard.md "$DIR"/script.md
echo ""
echo "To regenerate: run ./regenerate.sh"