Spaces:
Sleeping
Sleeping
Commit History
-
Add four accessibility checks/tools (now 14 tools)
ClaudeUnverified signature- check_slide_titles (pptx): reports slides with missing/empty or duplicated titles — key for screen-reader navigation. Read-only. - check_hyperlinks (pptx): flags non-descriptive link text ("click here", bare URLs, empty). Read-only. - check_font_size (pptx): reports runs below a minimum point size (default 18, configurable); runs with inherited sizes are counted as undetermined. Read-only. - set_pdf_title (pdf): sets the document title (/Info + XMP) and enables the DisplayDocTitle viewer preference so readers show the title, not the filename (PDF/UA). Produces a file. All wired into the registry/runners with structured reports; CLIs included. Smoke test bumped to 14 tools (7/7), acronym tests pass, all four verified on a purpose-built deck/PDF.e553423 -
fix_pdf_lang_tags: terminate the object-graph walk on cyclic PDFs
ClaudeUnverified signaturewalk_all_objects deduped visited nodes by id(), but pikepdf returns a fresh Python wrapper on every access, so the visited set never matched and reference cycles (page /Parent -> /Pages -> /Kids -> page) were re-walked until the recursion limit — masked by the broad `except Exception: pass`. A 3-page blank PDF triggered 2,071 walk calls; a real multi-page tagged PDF could near-hang. Now dedupe indirect objects by their stable (objnum, gen) id (objgen) and always recurse direct objects (which can't form cycles). Same 3-page PDF now takes 36 calls; /Lang detection and rewriting still work.3879475 -
Minor robustness fixes: B4, B5, S5
ClaudeUnverified signatureB5: fix_pdf_lang_tags now escapes the target language for the PDF content- stream literal string, so a value containing '(' ')' or '\\' can't malform the stream (the dictionary path already escaped via pikepdf.String). B4: a background task sweeps abandoned result files every 10 min via the app lifespan, so idle downloads are cleaned even with no further requests (was only swept at the start of the next run). S5: uploads are now content-checked by leading bytes (%PDF / PK zip header), not just extension, so files that don't match their claimed type are rejected before reaching a parser. Verified: garbage .pptx rejected as invalid, PDF target with parens stays a valid PDF, sweeper starts with the app, smoke test 7/7, acronym tests pass. B3 (lone 'i'->'I') investigated and dropped: _to_mixed_case output is identical to str.title() in every 'i' case, so there is no real defect.bc4fb4f -
Structured reports instead of scraped stdout
ClaudeUnverified signatureRunners now return a structured RunResult (summary, counts, findings table rows + columns, and a collapsible raw_log) rather than a captured-text blob. The structured data comes from each tool's return value or an additive, non-breaking hook (an optional changes list, or a return dict where the function previously returned None) — the CLIs are byte-for-byte unchanged. - tools: convert_caps/replace_allcaps/remove_footer_text expose before->after changes; fix_pptx_lang_tags/fix_pdf_lang_tags return their findings counters; fix_math_italics returns structured replacements; fix_slide_number_order lists the slides it reordered. - API: /api/run/{tool} now returns one structured block per file (unifying single + batch); per-file errors are reported in-band rather than aborting. - frontend: renders summary, count chips, a findings table, and a "Show log" details pane per result. Verified: structured output end-to-end, all CLIs unchanged, acronym tests and smoke test (7/7) green.154b1f0 -
Scaffold PPTX/PDF accessibility tools web app
ClaudeUnverified signatureLays out the structure from CLAUDE_CODE_BRIEF.md without implementing tool logic: empty FastAPI app with /api/health and /api/tools, static frontend stub, empty tool registry, Dockerfile + docker-compose with qpdf baked in for pikepdf. Existing CLI scripts moved into tools/.307de64