51 lines
2.1 KiB
Markdown
51 lines
2.1 KiB
Markdown
# beffroi-tools
|
|
|
|
Beffroi tools, for everyday usage
|
|
|
|
## PPTX video reports
|
|
|
|
Extract videos and create a Markdown timing report:
|
|
|
|
```sh
|
|
python pptx_videos.py presentation.pptx
|
|
```
|
|
|
|
Generate one or more report formats without keeping newly extracted videos:
|
|
|
|
```sh
|
|
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
|
|
|
|
```sh
|
|
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.
|