Skip to content

Keep article pictures readeck drops - #113

Merged
paskal merged 1 commit into
masterfrom
fix/readeck-pictures
Dec 1, 2026
Merged

paskal merged 1 commit into
masterfrom
fix/readeck-pictures

Conversation

@paskal

@paskal paskal commented Dec 1, 2026

Copy link
Copy Markdown
Member

Previously, readeck dropped article pictures in three cases: pictures inside a <button>, charts in hidden tab panels, and figures whose caption is mostly a link inside formatting.

After this change, keepPictures prepares the page before readeck parses it:

  • It replaces a button with its contents when the button holds a picture with alt text that appears nowhere else on the page.
  • It shows a hidden tab panel that holds a captioned picture.
  • It unwraps the formatting around a link in a figure caption, so readeck does not count the credit as link text.

keepPictures leaves out icons (svg, or declared under 64 px), thumbnails of pictures the page already shows, tabs, buttons inside links, hidden buttons and quote carousels.

Recovered pictures can make readeck discard the element that holds them, together with pictures it kept before. So when keepPictures changes the page, readeck parses both versions. The prepared result is used only if it keeps every picture and all the text of the original result. If the original parse finds no article, the hidden-element pass and the media-only fallback apply as before.

Across 578 saved articles compared with master, 19 pages gain pictures (zed.dev's 1.0 post 1 → 6, one chart each on six Substack posts) and none loses any. The only added text is captions. Mean text F1 moves from 0.9253 to 0.9251, because the reference text omits the recovered captions of one anthropic.com post, which is in the set at two URLs.

Each test fails when the rule or guard it covers is reverted.

readeck drops pictures inside buttons and hidden tab panels, and figures
whose caption is mostly a link inside formatting. Sites use all three
for article pictures: a screenshot that opens full size, one chart of a
group shown at a time, an italic source credit.

keepPictures prepares these elements before readeck parses the page.
When it changes the page, readeck parses the original page too, and the
prepared result is used only if it keeps every picture and all the text
of the original one.
@paskal
paskal merged commit 24d2293 into master Dec 1, 2026
2 checks passed
@paskal
paskal deleted the fix/readeck-pictures branch December 1, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant