Mastodon

Bonus Drop #134 (2026-11-29): Read • Ignore • Shoot

OCRia-nano-1; inert; Site-Shot

We’re all over the place in today’s Drop, but that should mean there’s something for everyone.

If you have no problem using Tesseract (text extractor) then you shouldn’t have a problem using the model in the first resource, but it’s your loss if you do decide to skip it solely due to the fact that it sounds “AI”-ish.

The last resource is something I use when I don’t want to point my own browser at a potentially harmful site just to take a screenshot, and also don’t want to give skeezy security vendors content or telemetry.


OCRia-nano-1

LlamaIndex has released OCRia-nano-1, an OCR model small enough to run on an ordinary laptop CPU. The whole pipeline is 8.1 million parameters and contains seven specialized models that together handle text recognition, table structure, and page layout. You run it locally through LiteParse (GH), their open-source document parser, and it outputs Markdown, JSON, or plain text. The weights are open and downloadable from Hugging Face under a modified Open RAIL-M license, so you can inspect, host, and build on it yourself.

Most organizations sit on a huge pile of PDFs, scans, and invoices, and it is difficult to find a existing tool handles them all well. Free parsers like Tesseract are fast but break on tables and complex layouts. Big vision-language models handle those well, but at a cost and latency that make no sense for a regular pipeline job. Nano sits in between: it beats other tools such as Marker, PP-OCRv6 tiny, and Tesseract on tables and layouts while running 2-5x faster than Tesseract, at about 426 milliseconds per page on a single CPU core. For bulk jobs, 16 single-core workers push it to 27.8 pages per second, double LiteParse’s Tesseract configuration.

It also works across languages. The recognizers cover Latin, CJK, right-to-left scripts, and others, and a tiny router picks the dominant script per page, handles mixed-script lines, and detects upside-down pages before reading. Nano was trained by distillation: LlamaIndex used their larger OCRia-1 model to generate the text transcriptions, table annotations, and layout labels it learned from.

Usage is straightforward, but I suggest looking for and removing any existing liteparse installs before doing the following (when I poked at this, the only pre-compiled version that had the models subcommand was the one in npm):

$ npm i -g @llamaindex/liteparse
$ lit models pull ocria-nano
$ curl -o cisos-artex-0.81.pdf https://rud.is/dl/cisos-artex-0.81.pdf
$ hyperfine "lit parse cisos-artex-0.81.pdf --format markdown"
Benchmark 1: lit parse cisos-artex-0.81.pdf --format markdown > /dev/null
Time (mean ± σ): 1.948 s ± 0.013 s [User: 5.623 s, System: 0.724 s]
Range (min … max): 1.929 s … 1.964 s 10 runs

JSON and plaintext take roughly the same amount of time, and that file is a 27-page PDF composed in Figma with a great deal of formatting, including many tables.

A singular, bare (non-benchmark) run shows some details during the process:

[liteparse] extract: 192.2ms (26 pages)
[liteparse] table inputs: 157.7ms
[liteparse] table renders: 414.9ms (during OCR)
[liteparse] ocr: 1441.3ms
[liteparse] table model: 63.4ms over 26 pages
[liteparse] project: 74.1ms
[liteparse] markdown: 14.1ms
[liteparse] total: 1880.2ms

This new model under liteparse is now my preferred way to store markdown of PDFs in Joplin along with the PDFs themselves. It’s faster and more accurate/thorough than any previous tool.

The section header is one of the tables from the markdown, rendered with the bat utility.


inert

I’ve been cooking up something with the latest free-tier (can’t justify the annual license at least for this year) bundle of WebAwesome (“The Web’s Open Source Design System”) and was Kagi’ing for modern ways to disable parts of an interface (my memory only knows about disabled), and came across the inert global attribute.

An inert HTML element, along with everything beneath it in the flat DOM [sub]tree, loses its normal interactive behavior. Clicking it fires no click event. It cannot receive focus, so no focus event fires on it either. Browser find-in-page skips its content entirely: nothing inside it matches. Folks interactng with the page cannot select its text, much as if user-select had disabled selection. Content that would otherwise be editable, such as a textual <input> field or an element with contenteditable, cannot be edited. And assistive technologies never see it, because it is left out of the accessibility tree.

Two other features can also put an element and its descendants into the inert state: the CSS interactivity property and the HTMLElement.inert DOM property.

Now, disabled and inert both block interaction, but they operate on different DOM territory. inert goes on any element but disabled exists only on form-related elements: input, button, select, textarea, option, optgroup, and fieldset. It propagates in just two places, from a disabled fieldset to the form controls inside it (controls within the first legend excepted) and from an optgroup to its options. It cannot be put on an arbitrary container like a div or nav, and it does nothing to links or other non-control descendants: they stay clickable, focusable, searchable, and exposed to screen readers. What disabled gives you in return is semantics: disabled controls are excluded from form submission, skip constraint validation, match the :disabled pseudo-class, and are announced to assistive tech as dimmed rather than hidden.

After poking around some accessibility-centric guides, it seems said guidance is to use disabled for individual form controls where the browser should still announce them as present but unavailable. inert should be used for whole regions of content that should become unreachable to everyone, mouse, keyboard, screen reader, and search alike, such as the page behind an open modal.

I put together a very small demo that shows how to use it.


Site-Shot

Site-Shot is a free browser tool for capturing any website as an image. There’s nothing to sign up for, no required API key (you can get one to use it programmatically if desired; see next ❡), and no credit card. It exports PNG, JPEG, or lossless WebP, and can emulate desktop, tablet, or mobile screens with a viewport of any size.

If you want to automate the same thing in your own code, the Site-Shot API uses the same Chromium engine as the browser tool. You create an account, confirm your email, and you get an API key on the free plan: 100 captures a month, still no card required. One request per URL returns a full-page screenshot, either as a file or as base64 JSON. API use does cost some coin ($5 per month for 2,000 screenshots per month).

Full-page captures can run up to 20,000 pixels tall (16,383 for WebP). The tool scrolls and stitches long pages itself, and it can remove ad banners and cookie popups before taking the shot. You can also route requests through proxies in 49 countries, so the page loads as it would for a visitor in that country. Sample code is available in nine languages.

Section header is a macOS Preview window capture of a Site-Shot of the previous Drop on a Google Pixel. It’s very long, and you can see the render at https://rud.is/dl/drop-shot.png.


FIN

Remember, you can follow and interact with the full text of The Daily Drop’s free posts on:

  • Mastodon via @dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev
  • Bluesky via <https://bsky.app/profile/dailydrop.hrbrmstr.dev.web.brid.gy>

☮️

Leave a Reply