Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions docs/Blog/video/build-scenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,11 +986,23 @@ def retime(guiones: dict) -> None:
print()


def ensure_stills(page_obj) -> dict:
"""Capture the real report sections the evidence scenes pan over."""
def ensure_stills(page_obj, refresh: bool = False) -> dict:
"""Capture the real report sections the evidence scenes pan over.

Captured once and kept, because the run behind them is slow. That is also how they go stale
without anyone noticing: these sat sixteen days and ten releases behind the tool whose output
they are supposed to BE, and the only reason the film was not showing something untrue is
that the fixture happened to extract identically. `--restills` is the way to check that
rather than assume it -- and a byte-identical recapture is itself the useful answer.
"""
STILLS.mkdir(parents=True, exist_ok=True)
wanted = {key: STILLS / f"{key}.png" for key, _, _ in STILLS_WANTED}

if refresh:
REPORT.unlink(missing_ok=True)
for path in wanted.values():
path.unlink(missing_ok=True)

if any(not path.exists() for path in wanted.values()):
if not REPORT.exists():
print(f" generating {REPORT.name} from {FIXTURE.name}")
Expand Down Expand Up @@ -1046,6 +1058,10 @@ def main() -> None:
parser.add_argument("--assemble", action="store_true",
help="join the rendered scenes into one film per language, carrying "
"each scene's narration if audio/<lang>/<scene>.mp3 exists")
parser.add_argument("--restills", action="store_true",
help="recapture the evidence stills from a fresh run of the tool. They "
"are captured once and kept, so without this they outlive the "
"output they are supposed to be evidence of")
parser.add_argument("--retime", action="store_true",
help="rewrite each scene's length from its recorded take, or from its "
"word count until one exists, and print the chapter list")
Expand Down Expand Up @@ -1076,7 +1092,7 @@ def main() -> None:
with sync_playwright() as playwright:
browser = playwright.chromium.launch()
helper = browser.new_page()
stills = ensure_stills(helper)
stills = ensure_stills(helper, refresh=args.restills)
helper.close()
print()
for still in stills.values():
Expand Down
Binary file modified docs/Blog/video/posters/en/08-roslyn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Blog/video/posters/es/08-roslyn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/Blog/video/scenes/en/08-roslyn.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<div class="main">
<div class="split">
<div class="src"><div class="src__path mono" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 0.4s both fade">PharmacyDemo.Module/BusinessObjects/Prescription.cs</div><div class="src__code mono" style="font-size:16px"><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 0.9s both wipe">[DefaultClassOptions]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 1.1800000000000002s both wipe">[NavigationItem("Care")]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 1.46s both wipe">[XafDefaultProperty(nameof(Reference))]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 1.7400000000000002s both wipe">[Description("Authority to dispense a restricted product.")]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 2.02s both wipe">[<span class="hit">RuleCriteria</span>("Prescription_NotExpired", DefaultContexts.Save, "ExpiresOn &gt; IssuedOn", CustomMessageTemplate = "A prescription cannot expire before it was issued.")]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 2.3000000000000003s both wipe">public class Prescription : XPCustomObject</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 2.58s both wipe">{</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 2.8600000000000003s both wipe"> public Prescription(Session session) : base(session) { }</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 3.14s both wipe">&nbsp;</div></div></div>
<div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 3.4s both rise"><span class="n mono">&#9679;</span><span>Works on a branch that does not build</span></div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 4.75s both rise"><span class="n mono">&#9679;</span><span>No DevExpress assembly is ever referenced</span></div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 6.1s both rise"><span class="n mono">&#9679;</span><span>270 tests run free on a public runner</span></div></div>
<div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 3.4s both rise"><span class="n mono">&#9679;</span><span>Works on a branch that does not build</span></div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 4.75s both rise"><span class="n mono">&#9679;</span><span>No DevExpress assembly is ever referenced</span></div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 6.1s both rise"><span class="n mono">&#9679;</span><span>556 tests run free on a public runner</span></div></div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/Blog/video/scenes/es/08-roslyn.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<div class="main">
<div class="split">
<div class="src"><div class="src__path mono" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 0.4s both fade">PharmacyDemo.Module/BusinessObjects/Prescription.cs</div><div class="src__code mono" style="font-size:16px"><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 0.9s both wipe">[DefaultClassOptions]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 1.1800000000000002s both wipe">[NavigationItem("Care")]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 1.46s both wipe">[XafDefaultProperty(nameof(Reference))]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 1.7400000000000002s both wipe">[Description("Authority to dispense a restricted product.")]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 2.02s both wipe">[<span class="hit">RuleCriteria</span>("Prescription_NotExpired", DefaultContexts.Save, "ExpiresOn &gt; IssuedOn", CustomMessageTemplate = "A prescription cannot expire before it was issued.")]</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 2.3000000000000003s both wipe">public class Prescription : XPCustomObject</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 2.58s both wipe">{</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 2.8600000000000003s both wipe"> public Prescription(Session session) : base(session) { }</div><div class="ln" style="animation:0.4s cubic-bezier(.2,.7,.3,1) 3.14s both wipe">&nbsp;</div></div></div>
<div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 3.4s both rise"><span class="n mono">&#9679;</span><span>Funciona en una rama que no compila</span></div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 4.75s both rise"><span class="n mono">&#9679;</span><span>Nunca referencia un ensamblado de DevExpress</span></div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 6.1s both rise"><span class="n mono">&#9679;</span><span>270 pruebas corren gratis en un runner público</span></div></div>
<div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 3.4s both rise"><span class="n mono">&#9679;</span><span>Funciona en una rama que no compila</span></div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 4.75s both rise"><span class="n mono">&#9679;</span><span>Nunca referencia un ensamblado de DevExpress</span></div><div class="fact" style="animation:0.5s cubic-bezier(.2,.7,.3,1) 6.1s both rise"><span class="n mono">&#9679;</span><span>556 pruebas corren gratis en un runner público</span></div></div>
</div>
</div>
</div>
Expand Down
Loading