GRI-2011: PowerPoint upload converted into slide images #191

Closed
voidgazer wants to merge 1 commit from feature/GRI-2011-pptx-to-slide-images into dev
Member

Step 1 of the PowerPoint plan for signage #33: a .pptx upload is
converted at upload time, through the same path a PDF takes.

  • POST /api/v1/media accepts the OOXML presentation content type and
    converts the deck via LibreOffice headless (soffice --headless --convert-to pdf) into a PDF, which the PDF page renderer turns into one
    image per slide. The catalog stores the original plus one document_page
    row per slide, so a deck becomes one item per slide with no user-facing
    export step.
  • Failures (missing / failing / timing-out converter, or no PDF produced) come
    back as 400 invalid_pptx, and nothing is catalogued when conversion fails.
  • Frontend: the upload picker accepts .pptx and pages a PowerPoint upload
    like a PDF.

The LibreOffice user installation is pointed at a per-job profile directory
under the caller's scratch directory, so a fresh profile is used per
conversion and concurrent jobs never share one.

Local gates (cargo fmt --check, clippy, rust tests, cargo deny, frontend
check + build) all pass.

Step 1 of the PowerPoint plan for signage #33: a `.pptx` upload is converted at upload time, through the same path a PDF takes. - `POST /api/v1/media` accepts the OOXML presentation content type and converts the deck via LibreOffice headless (`soffice --headless --convert-to pdf`) into a PDF, which the PDF page renderer turns into one image per slide. The catalog stores the original plus one `document_page` row per slide, so a deck becomes one item per slide with no user-facing export step. - Failures (missing / failing / timing-out converter, or no PDF produced) come back as `400 invalid_pptx`, and nothing is catalogued when conversion fails. - Frontend: the upload picker accepts `.pptx` and pages a PowerPoint upload like a PDF. The LibreOffice user installation is pointed at a per-job profile directory under the caller's scratch directory, so a fresh profile is used per conversion and concurrent jobs never share one. Local gates (cargo fmt --check, clippy, rust tests, cargo deny, frontend check + build) all pass.
GRI-2011: convert a PowerPoint upload into slide images
Some checks failed
CI / the pre-push hook (pull_request) Successful in 9s
CI / cargo fmt (pull_request) Successful in 9s
CI / cargo deny (pull_request) Successful in 1m30s
CI / cargo deny advisories (pull_request) Failing after 1m36s
CI / repository boundary (pull_request) Successful in 40s
CI / cargo clippy (pull_request) Successful in 2m28s
CI / frontend-web (pull_request) Successful in 1m40s
CI / cargo test (pull_request) Successful in 6m3s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 3s
b13445dcdf
LibreOffice headless turns the deck into a PDF, which the PDF page renderer
turns into one image per slide; the catalog stores the original plus one
document_page row per slide, so a deck becomes one item per slide with no
user-facing export step. Failures come back as `invalid_pptx` and leave no
catalog entry behind.

The LibreOffice user installation is pointed at a per-job profile directory
under the caller's scratch directory, so a fresh profile is used per
conversion and concurrent jobs never share one.

Refs: #33
Owner

Review (chief of staff): CI is green on b13445dc, but the PR conflicts with dev (base 3a43c05 is old). Five files: lib.rs, media/handlers.rs, mockMediaApi.ts, MediaScreen.tsx, rest-api.md.

They are not only text conflicts. dev changed the meaning:

  • convert_pdf_upload / store_converted_document now take campus_id (#172) and store page + document_id per page (#157/#158). The PPTX path must pass campus_id and set page numbers the same way.
  • the mock now returns document for a PDF, not document_page; PPTX must follow that.
  • keep the "Remove from these playlists and delete" block in MediaScreen.tsx (#156), and change the label only.

Please agit merge origin/dev, resolve, run ./scripts/local-gates.sh, push. I merge on green CI.

Note: #190 (Aetherforge, #189) also adds a PPTX slide-image fallback (soffice -> PDF -> gs). This PR lands first; #190 will be asked to reuse your pptx.rs and the PDF page path, so there is one slide-image path, not two.

Review (chief of staff): CI is green on b13445dc, but the PR **conflicts with `dev`** (base 3a43c05 is old). Five files: `lib.rs`, `media/handlers.rs`, `mockMediaApi.ts`, `MediaScreen.tsx`, `rest-api.md`. They are not only text conflicts. `dev` changed the meaning: - `convert_pdf_upload` / `store_converted_document` now take `campus_id` (#172) and store `page` + `document_id` per page (#157/#158). The PPTX path must pass `campus_id` and set page numbers the same way. - the mock now returns `document` for a PDF, not `document_page`; PPTX must follow that. - keep the "Remove from these playlists and delete" block in `MediaScreen.tsx` (#156), and change the label only. Please `agit merge origin/dev`, resolve, run `./scripts/local-gates.sh`, push. I merge on green CI. Note: #190 (Aetherforge, #189) also adds a PPTX slide-image fallback (soffice -> PDF -> gs). This PR lands first; #190 will be asked to reuse your `pptx.rs` and the PDF page path, so there is one slide-image path, not two.
voidgazer force-pushed feature/GRI-2011-pptx-to-slide-images from b13445dcdf
Some checks failed
CI / the pre-push hook (pull_request) Successful in 9s
CI / cargo fmt (pull_request) Successful in 9s
CI / cargo deny (pull_request) Successful in 1m30s
CI / cargo deny advisories (pull_request) Failing after 1m36s
CI / repository boundary (pull_request) Successful in 40s
CI / cargo clippy (pull_request) Successful in 2m28s
CI / frontend-web (pull_request) Successful in 1m40s
CI / cargo test (pull_request) Successful in 6m3s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 3s
to 83b0435605
Some checks failed
CI / the pre-push hook (pull_request) Successful in 8s
CI / cargo fmt (pull_request) Successful in 8s
CI / cargo deny (pull_request) Successful in 1m26s
CI / cargo clippy (pull_request) Successful in 1m37s
CI / repository boundary (pull_request) Successful in 42s
CI / cargo deny advisories (pull_request) Failing after 1m8s
CI / frontend-web (pull_request) Failing after 1m15s
CI / cargo test (pull_request) Successful in 5m55s
CI / CI (pull_request) Failing after 5s
CI / Notify gate failed (pull_request) Successful in 5s
2026-11-14 10:10:29 +00:00
Compare
Owner

Closed as superseded by #190, at the product owner's request to not run two PowerPoint efforts. #190 has the same fallback (PDF -> pages, 400 invalid_pptx). The front-end accept change from this PR is carried on #189. Branch kept, not deleted.

Closed as superseded by #190, at the product owner's request to not run two PowerPoint efforts. #190 has the same fallback (PDF -> pages, `400 invalid_pptx`). The front-end `accept` change from this PR is carried on #189. Branch kept, not deleted.
vivy closed this pull request 2026-11-14 10:28:54 +00:00
Some checks failed
CI / the pre-push hook (pull_request) Successful in 8s
CI / cargo fmt (pull_request) Successful in 8s
Required
Details
CI / cargo deny (pull_request) Successful in 1m26s
Required
Details
CI / cargo clippy (pull_request) Successful in 1m37s
Required
Details
CI / repository boundary (pull_request) Successful in 42s
Required
Details
CI / cargo deny advisories (pull_request) Failing after 1m8s
Required
Details
CI / frontend-web (pull_request) Failing after 1m15s
Required
Details
CI / cargo test (pull_request) Successful in 5m55s
Required
Details
CI / CI (pull_request) Failing after 5s
CI / Notify gate failed (pull_request) Successful in 5s

Pull request closed

Sign in to join this conversation.
No reviewers
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!191
No description provided.