Campus kit for other ProPresenter Macs (v1.3.0)
- settings.py: per-Mac settings.json (campus code, youtube); ProPresenter
folder, network port and template library read from ProPresenter itself
- First run / --setup / y asks the campus; YouTube text only at NA
- Preacher picked for this campus from the notes email; a lone surname
("Pastor Geyser") matches the most recent speaker with it
- Never restart ProPresenter when its network API is off or not answering
- tools/make_kit.sh builds "Message Notes Kit <version>.zip" (installer,
program, launcher, READ ME FIRST); deploy.sh writes NA's settings
- Email setup text no longer names media@
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,35 @@ def main():
|
||||
except spelling.Unavailable as e:
|
||||
print("skip typo checks (%s)" % e)
|
||||
|
||||
# 7. other campuses: their template names, and who preaches there according to the email
|
||||
import app
|
||||
import settings
|
||||
for n, want in (("_TEMPLATE - DO NOT DELETE 2608 Lower Thirds.pro", True),
|
||||
("_TEMPLATE_GENERIC - DO NOT DELETE 2601.pro", True),
|
||||
("_RESI MESSAGE TEMPLATE.pro", False), ("._TEMPLATE - DO NOT DELETE 2608.pro", False),
|
||||
("261011 Where Is Your Faith Part 7.pro", False)):
|
||||
check("template name %s" % n, settings.is_template(n) == want)
|
||||
known = [("LOCATION PASTOR", "Mehdi Chniouli"), ("PASTOR", "Test Geyser"), ("LEAD PASTOR", "Tim Hatch"),
|
||||
("PASTOR", "Other Geyser")]
|
||||
mail = ("Subject: Notes/Slides - Where Is Your Faith - Part 7\n\nHi all,\nPastor Mehdi will be preaching live "
|
||||
"from NA with RESI to SC and WS. I have attached the notes/slides. Pastor Geyser will be preaching "
|
||||
"live in AB. Please have blank notes ready.\n")
|
||||
real_load = settings.load
|
||||
try:
|
||||
for campus, want in (("NA", "Mehdi Chniouli"), ("SC", "Mehdi Chniouli"), ("WS", "Mehdi Chniouli"),
|
||||
("AB", "Test Geyser")):
|
||||
settings.load = lambda c=campus: {"campus": c}
|
||||
got = app.speaker_from_email(mail, known)
|
||||
check("speaker at %s" % campus, got and got[1] == want, "got %s" % (got,))
|
||||
settings.load = lambda: {"campus": "AB"}
|
||||
got = app.speaker_from_email("Pastor Tim will be preaching live from NA with RESI to all other locations.", known)
|
||||
check("speaker at AB from 'all other locations'", got and got[1] == "Tim Hatch", "got %s" % (got,))
|
||||
check("youtube only at NA", not settings.youtube_enabled())
|
||||
settings.load = lambda: {"campus": "NA"}
|
||||
check("youtube at NA", settings.youtube_enabled())
|
||||
finally:
|
||||
settings.load = real_load
|
||||
|
||||
print()
|
||||
print("FAILED: %s" % failures if failures else "all checks passed")
|
||||
return 1 if failures else 0
|
||||
|
||||
Reference in New Issue
Block a user