3.4 KiB
beffroi-tools
Beffroi tools, for everyday usage
PPTX video reports
Extract videos and create a Markdown timing report:
python pptx_videos.py presentation.pptx
Generate one or more report formats without keeping newly extracted videos:
python pptx_videos.py presentation.pptx --timings-only --report html,pdf
python pptx_videos.py presentation.pptx --report html,typst,pdf,md,txt,json
--report accepts comma-separated formats and can be repeated. Markdown is the
default. Reports are saved as timings.* in <presentation-stem>_videos, or the
directory supplied with -o. PDF uses the Typst CLI and retains timings.typ
for editing. HTML and Typst/PDF include colored summary cards and pills;
Markdown and TXT use aligned tables. JSON includes numeric durations in seconds,
sizes in bytes, and slide references.
Timings require ffprobe (from FFmpeg); PDF additionally requires typst on
PATH. Use --extract-only to extract without a report. Presentations with no
embedded videos produce no output. Terminal progress uses colors automatically;
set NO_COLOR to disable them.
Export presentations and PDF pages
python exporter.py presentation.pptx --output pdf,images
python exporter.py document.pdf --output images
python exporter.py presentation.pptx --output images --dpi 192 -d exports
exporter.py uses DeckCraft for PPTX exports and PdfCraft for PDF page rendering.
It finds deckcraft-cli / pdfcraft-cli on PATH, or temporarily extracts the
bundled CLI from the newest matching AppImage in ~/Applications. You can
specify a CLI executable or AppImage with --deckcraft-cli / --pdfcraft-cli,
or the DECKCRAFT_CLI / PDFCRAFT_CLI environment variables.
Output goes to <file-stem>_export/: <file-stem>.pdf and/or numbered PNGs
inside images/. Images default to 144 DPI. Existing output requires
--overwrite, which replaces generated files and removes stale numbered
slide/page PNGs. PDF-to-PDF is a successful no-op; other input extensions are
errors. Rendering completes in temporary storage before output is copied.
Tests and Jenkins
Run the same suite locally and in Jenkins:
python3 -m unittest -v test_exporter test_pptx_videos
The declarative Jenkinsfile uses the rust_no_docker worker label and requires
Git and Python 3.9 or newer. It performs a clean SCM checkout, checks Python,
and runs the standard-library unit tests. No packages are installed.
Tests cover export validation, overwrite handling, failed conversions, PPTX discovery and slide order, temporary video cleanup, report formats, and PDF compiler invocation. External CLI calls are mocked: CI does not require FFmpeg, Typst, DeckCraft, or PdfCraft and does not claim to verify rendering fidelity.
This is a test-only pipeline on every configured branch: no build artifacts, archives, publication, badges, or Checks API calls. Status is reported in Jenkins. There are no pipeline credential bindings; SCM access uses the Jenkins job's configured repository credentials.
Configure a Pipeline from SCM or multibranch job for this repository with
Jenkinsfile as the script path (main is the default branch). For a Gitea-aware
multibranch job, use the installation's Jenkins base URL plus
/gitea-webhook/post as the Gitea webhook target and enable push events.
The Jenkins administrator must supply the actual reachable URL and SCM
credentials. This repository does not create the job or register the webhook.