Skip to main content

ppt-quality-review

Quality-review stack for generated slide decks. Three layers:

  1. Heuristic description review — 4D/5D quality frameworks (Structure, Density, CRAP design principles, Scene, Visual richness) scoring slide description dicts, plus CJK-aware content-density and image-density analyzers.
  2. Static gate — pluggable subprocess adapter for an external SVG checker script (exit 0 = pass).
  3. Render-level VLM visual QC — render slide SVGs to PNGs (Playwright), review each page with a vision LLM (blocking vs cosmetic severity tiers), and produce re-authoring feedback strings.

Install

pip install ppt-quality-review

Optional extras (as declared in pyproject.toml):

  • [llm]openai>=1.0.0 + httpx>=0.24.0, for the default VLM client (ppt_common.llm.LLMClient, OpenAI-compatible).
  • [visual]playwright>=1.40 + pillow>=10.0, for the SVG→PNG renderer (ppt_quality_review.svg_render).
  • [dev]pytest>=7.0, for working on the package itself.

Layer 1 (heuristics) and Layer 2 (static gate) need no extras beyond the ppt-common base dependency.

Quickstart

A runnable offline version of this example (no API key needed) ships in examples/heuristic_review.py.

from ppt_quality_review import analyze_quality_5d

slides = [
    {"type": "content", "title": "Intro",
     "bullets": ["Point one", "Point two"], "image_path": "a.png"},
    {"type": "content", "title": "Details",
     "bullets": ["Fact A", "Fact B"], "image_path": "b.png"},
]
report = analyze_quality_5d(slides)
print(report.overall_score, [str(i) for i in report.all_issues])

Bring your own VLM client (Layer 3)

Any object with one method satisfies VisionReviewer:

from ppt_quality_review import review_rendered_pages
from ppt_quality_review.svg_render import render_svg_dir

class MyReviewer:
    def chat_with_images(self, user_prompt, image_paths, *, model=""):
        ...  # call your VLM of choice, return the raw text response

render = render_svg_dir(svg_dir, out_dir)          # needs [visual] extra
review = review_rendered_pages(render["pages"], page_briefs,
                               client=MyReviewer())
print(review.blocking)  # [(page_index, issue), ...]

The default client (ppt_common.llm.LLMClient, OpenAI-compatible/DashScope) is used when client=None; it needs the [llm] extra and DASHSCOPE_API_KEY/LLM_API_KEY env vars. Any OpenAI-compatible endpoint works: LLMClient also honors LLM_BASE_URL / LLM_MODEL (with DASHSCOPE_BASE_URL / DASHSCOPE_MODEL fallbacks), or explicit api_key= / base_url= / model= arguments.

Static gate

from ppt_quality_review import SubprocessStaticGate, run_quality_gate

gate = SubprocessStaticGate(script_dir="/path/to/checker/scripts")
result = gate.run(svg_project_dir)   # GateResult(passed, exit_code, output)

Unconfigured gates soft-pass (exit_code=-1); host projects pin their own checker via the script_dir arg.

Unavailable ≠ failure. When script_dir is configured but the checker script itself is missing from it, the gate also soft-passes with exit_code=-1 and logs a WARNING — a missing checker never blocks a build. In practice this only triggers on a corrupted or partial checkout of the checker scripts.

Integration

The three layers compose into an author→gate→render→review→re-author loop; the host pipeline decides when to invoke each layer. Layers 1 and 2 are offline; Layer 3 needs the [llm] and [visual] extras.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ppt_quality_review-1.0.1.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ppt_quality_review-1.0.1-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file ppt_quality_review-1.0.1.tar.gz.

File metadata

  • Download URL: ppt_quality_review-1.0.1.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ppt_quality_review-1.0.1.tar.gz
Algorithm Hash digest
SHA256 87d6ad51527140ef5c9cda72f9665dd3d37fb3045e7487d4a9f0c35e0110b715
MD5 70324beaaebb3e3bb4cbde0b4f1ab87d
BLAKE2b-256 16774acbca59f9a892c4ec21fd187dee14416c36f364515c63a6dbefe152a759

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppt_quality_review-1.0.1.tar.gz:

Publisher: publish.yml on back1992/ppt-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ppt_quality_review-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ppt_quality_review-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74af4d2400670adcf093866c9f31fb5ec96af808960755797cad035a4d4e4bee
MD5 f8c21d222f6cb53730c69b9a6f0ba622
BLAKE2b-256 13623e10f8aef0b3a98f073087033d4b11938c76cabc14176d4e273f0651ce57

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppt_quality_review-1.0.1-py3-none-any.whl:

Publisher: publish.yml on back1992/ppt-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page