Repository navigation
0.8.0: pptx figures, PDF tables and headings, queue routing, tool lookup - #14
Merged
Merged
Conversation
…tion White fill-only rects paint nothing, and highlight rects that do not line up with any thin rule are text highlights; pdfplumber took their edges as cell edges, making tables out of diagram label backgrounds and splitting real cells into phantom rows and columns. Both are filtered before find_tables. Shading aligned to the rules stays, and a page that yields no table without its highlights is read with them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The paragraph text was built from para.text, which drops run properties, so struck (removed) text read as a live statement. Runs whose rPr has strike=sngStrike/dblStrike are now wrapped in ~~...~~, adjacent struck runs merged and edge whitespace kept outside the markers, in table cells too. The HTML output renders the marker as <del>. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every non-title shape went through the paragraph path, so footer text, slide numbers and the stale cached date field leaked into each slide's body. pptx-extract now skips those placeholders, and pptx-triage writes furniture.line_patterns from their letter-bearing lines so merge.py and furniture_absent also cover vision transcriptions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
decide() set needs-human as soon as any human item appeared and dropped every page escalation with it. Now the retryable pages retry first while attempts remain; the human items stay in the entry's reason and decide the document once nothing retryable is left. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ot run On a retry, the image shard of a recheck page still holds the previous attempt's descriptions until the scripts stage rewrites it, so planning too early reported the page as agent-free. Such pages are now listed in stale_pages with a stderr warning, and step 2b says to plan only after every 2a command has finished. Co-Authored-By: Claude Opus 5.5 <[email protected]>
caption held a printed caption for PDFs but agent prose for every other format, and every output rendered it as verbatim text. --no-visible-text now works for every format and the extractor prompt no longer asks for --caption. The deprecated --caption alias stores caption_source "agent"; Markdown and HTML render such a caption inside the interpretation markers, and it never becomes alt text, a figcaption, a ReqIF LONG-NAME or a bad_caption subject. bad_caption no longer flags an empty caption, which these formats never fill. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A title-block field shaped like a section number, on a printed TOC page, was reported as an unparsed TOC line and failed toc_headings_match. Triage now drops an unparsed line whose furniture key and y match a line pattern. When unparsed lines are the gate's only problem and entries exist, the gate passes and reports a toc_unparsed_lines warning instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
"4.1.1. Title" gave no number, so outline levels were kept as they were and headings came out flattened. The number regexes accept an optional trailing dot and keep it in the number, so the heading lookup key still matches the printed text. A section number's dot depth now wins over a differing outline level, and toc_headings_match flags a numbered heading whose level is not its dot depth. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With a TOC, a block became a heading only when it matched an entry, so every numbered heading deeper than the TOC, and every unlisted sub-heading, came out as a paragraph. A one-line numbered block deeper than the deepest TOC level, with an ancestor number in the TOC, at least body size, short and not a sentence, is now a heading at its dot depth. A one-line bold block larger than body size or underlined is a sub-heading one level below the heading above it; bold at body size stays a paragraph (label/value lists). The TOC gate no longer reports either kind as extra. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A running header drawn as a ruled box can reach well below the 12% top band, so its lines were never furniture and its cells became tables. Triage now grows a union from the repeated drawings that start in the band (adding every repeated drawing that overlaps it or lies within 15 pt) and, when the union is wide and stays near the edge, stores its bottom as furniture header_limit (footer_limit likewise). Band callers use furniture.page_band_rect, which moves the band to the limit, and page_tables is cropped at the top only (page_table_rect), so body tables running into the bottom band keep their rows. A thin rule under a one-line header keeps the 12% band. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A header element that leaked past furniture removal sat between a page's last paragraph and the next page's first, so the page-break join never fired. The join partners now skip leading and trailing elements whose center lies beyond a drawn header or footer limit (content rect, or header_limit/footer_limit), or inside a header-sized repeated_drawing excluded region. The plain 12% band is not used, as body text can reach into it. merge.py now passes page sizes for every PDF. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A group member's top was read in the group's child coordinate space, so grouped text sorted far from where it sits, and images carried no position at all and always trailed the slide's text. Positions are now mapped through every enclosing group transform; body elements carry top and images a bbox, in points, so merge.py interleaves them. Speaker notes stay last. Shapes with cNvPr hidden=1 (and members of a hidden group) are skipped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The picture branch wrote image.blob, the whole media part, ignoring a:srcRect, so a picture showing a small part of its source came out as a different-looking image. The crop is now applied (outsets clamped), a fully cropped picture is skipped, and an EMF/WMF or undecodable picture is cut from the slide PDF instead. render_region gains crop_png and accepts a pptx against render.py's cached slide PDF; pptx-extract converts the deck lazily, only when it needs a crop. Image elements record source_shape_id. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A graphicFrame holding an OLE object (an embedded worksheet), a chart or SmartArt matched no branch of extract_slide and vanished without an error. Such a frame now becomes a crop of the slide PDF at its bbox; an embedded Excel worksheet with an oleSize range becomes a table of just that range on the active sheet, hidden rows and columns dropped. Hidden frames and frames under 0.1% of the slide (add-in helpers) are skipped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Groups were flattened into their members, so a figure drawn from autoshapes kept only its text boxes and any tiny member icon, and a cropped picture with arrows drawn over it came out as its uncropped source without the overlays. A top-level group with at least two non-text drawing shapes, or a picture plus one, now becomes one crop of the slide PDF at the group's bbox; its text stays body text and its member pictures get no element of their own. Picture-filled shapes are cropped the same way. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ws installs under WSL render.py ran a bare "soffice" and crashed with a traceback when it was missing; report.py and the tesseract lookup only searched PATH (and the Windows folders only on native Windows). lib/office.py find_soffice() and find_tesseract() now check SCRIPTORIUM_SOFFICE / SCRIPTORIUM_TESSERACT, then PATH, then under WSL the Windows installs (Program Files, scoop). A Windows .exe run from WSL gets its file paths through wslpath -w (lib/wsl.py), including the LibreOffice profile URI and tesseract's image, output and --tessdata-dir paths. With no soffice, render.py exits 1 with one line naming the env var and the hand-converted PDF it reuses. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… proxy, records tool paths check_env.sh now looks tesseract and soffice up the way the scripts do (find_tools.py: SCRIPTORIUM_* variable, PATH, then a Windows install under WSL) and installs nothing when it finds one. An install through cached sudo runs apt-get update first and passes http_proxy/https_proxy through sudo -n env. When a tool stays missing it prints one block with the root command and the options that need no root. The resolved paths go to runs/env.json, and the orchestrator stops before rendering a pptx when soffice is null and no hand-made PDF exists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With only a header limit, the band rect put the bottom band at 88% with the content-rect centre test, so a body paragraph reaching into the bottom 12% counted as furniture. page_band_rect now returns the limits as a (top, bottom) pair that band_limits tests like the 12% bands. The header box also grows over gaps of up to 20 pt (about one header row), which a box whose first rule sits 15.5 pt above the next one needs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The gate wanted a sub-heading deeper than the nearest earlier heading it could see, but its level comes from the heading above it, which can be a deeper numbered heading on an earlier page, a level-6 heading, or a TOC entry whose page is off by one. Any heading marked sub_heading with a level now counts as made below the TOC. An underline is also at most 1.5 times as wide as its line, so a table or section rule under a bold label does not make it a heading. Docs list the toc_unparsed_lines warning. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lement figures_complete only inspects the image elements that exist, and pptx-triage counted images with the extractor's own walk, so a figure the extractor never produced could fail no gate. lib/pptx_shapes now builds a figure census on its own walk (pictures showing on at least 0.5% of the slide, embedded objects, charts, SmartArt, drawn groups, picture-filled shapes; hidden and degenerate shapes left out). pptx-triage writes it as pages[].figure_shapes with image_count its length, and gates.py runs pptx_figures_covered for pptx: each census shape needs an image or table whose source_shape_id is its id or a containing group's. A vision-tier page falls back to a count. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A footer placeholder repeating the deck title made a pattern that furniture_absent then flagged on the title slide and merge.py would strip from a vision body. footer_furniture now drops any footer line that also appears in a non-furniture shape. pptx-triage's stdout leaves out the figure_shapes lists, which stay in triage.json, and a CLI test covers extract_pptx.py's lazy slide-PDF path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Any table overlapping a drawing cluster excluded the whole cluster as table_overlap, so a diagram with a small legend table or labels read as tables was dropped silently. When the overlapping tables together cover less than 15% of the padded cluster, the cluster stays a figure and each table is recorded as table_in_figure; extract_text emits no table for it and the large_region_excluded gate treats it as benign. A table's own ruling plus padding covers far more and stays table_overlap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A header fill overshooting a ruled table past the content-frame crop, or row rules running out to a right rule a few points past the edge pdfplumber reports, read as off-grid drawings that cross cells. The table was then taken for a chart grid and its cluster became an image. Each drawing item is now clipped to the table bbox before the on-grid and inside-one-cell tests; a part wholly outside the table is ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
pdfplumber's lines strategy found only the ruled header row of a table whose data rows have no rules, so the table came out as one row and its data as loose paragraphs. A 1-row table with 3 or more cells now takes the rows of words printed under it while each run of words lies inside one header cell, stopping at a large gap, a horizontal rule, a larger font or a line across cells. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The per-line table filter ran only for a block that overlapped a table by more than half, so a block holding a header row plus many lines around it kept the header text as a paragraph next to the table. It now runs on every block of a page with tables. A line is dropped only when the table's cells hold it; a line inside the table bbox but in no cell (a cell left open by a missing rule) was in no cell's text and was lost, and now stays body text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
text_layer_coverage compared word sets over a page and its neighbours, so a word lost on a page passed whenever it also occurred once anywhere nearby. Words are now counted per page as a multiset. A neighbour page's surplus, its output words beyond its own text layer, still covers text a page-break join moved there. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A figure region's padding reached above the content rect, and the edge-label rule then grew the region over a short title-block line, so title-block text landed in figure_text. The padding now stops at the content rect (never cutting the drawing), and a line in the furniture band is never an edge label. The furniture gate checks each figure_text line against the letter-bearing patterns, since those lines carry no position the band test could use. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A handwritten signature drawn as a small cluster of bezier strokes fell under the 1% size floor and was dropped as tiny. A cluster with 20 or more curve items and no text line inside it is now a figure. A bitmap drawn as an inline image is not in the page's image list, so neither bitmap_bboxes nor extract_images saw it. Image placements that no listed image covers are now added, outside the furniture band, with their bytes read by xref or from the page's image block. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…0.7.1 # Conflicts: # plugins/scriptorium/tools/grade-output/README.md # plugins/scriptorium/tools/grade-output/scripts/gates.py
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
MichaelD-42
added a commit
that referenced
this pull request
Nov 29, 2026
0.8.0: pptx figures, PDF tables and headings, queue routing, tool lookup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Queue
needs-humanonce nothing retryable is left.plan.py --stage extractreports image pages it planned before the scripts ran asstale_pages.pptx
~~…~~, and HTML output shows it as<del>.pptx_figures_covered: triage counts the figures on each slide from the shape tree, and the gate checks that each one has an element.Captions
captionnow means a caption printed in the document.caption_source: "agent"and rendered as interpretation, not as document text.PDF tables and figures
table_in_figure).Headings, TOC and furniture
4.1.1.) take their level from the dot depth.furniture.header_limit/footer_limit) and removed. This also makes page-break joins work again on such documents.Environment
sofficeand tesseract are found throughSCRIPTORIUM_SOFFICE/SCRIPTORIUM_TESSERACT, then PATH, then a Windows install under WSL.sofficegives one clear message instead of a traceback.check_env.shrunsapt-get update, passes the proxy settings to apt, prints the install options that need no root, and writesruns/env.json.Test plan
main(path separators, the tesseract stub, a file lock, a cost stub).test_no_skillsfails only because of a stale localskills/__pycache__.evals/testspasses. The extraction eval is unchanged againstmain(text 0.991, headings 0.833, tables 1.0).soffice.exe/tesseract.exe(only unit-tested, with a fakewslpath)Known limits
sofficeis found only on PATH or through the env var.🤖 Generated with Claude Code