Skip to content

v3.6.0 — recipes can name the article body

Choose a tag to compare

@syswave-dev syswave-dev released this 26 Jul 14:39
· 23 commits to main since this release

Added

  • select.content — recipes can now name the article body outright. Until now the recipe engine was purely subtractive (select.remove, preprocess): a recipe could say what to throw away, but never what the article is, leaving the final choice to Readability's candidate scoring. select.content takes a list of CSS selectors, joins every match in document order into a single document, and uses that as the body — skipping both the Readability scoring and the Trafilatura auto-pick. Nested matches collapse to the outermost, invalid selectors skip themselves, and select.remove still applies first, so the two compose. Output carries source: recipe-content. Because a stale content selector would otherwise yield an empty article, a selection under 200 characters falls back to the normal pipeline and records the reason in metadata.extractorReason. Documented in SITE-RECIPES.md.

Fixed

  • Blog posts whose body is split across sibling containers lost everything outside the winning block (closes #44, thanks @SpiGAndromeda). Some CMS templates wedge an in-article call-to-action between two separate body containers; Readability scores a single top candidate and keeps only that candidate plus its direct siblings, so the entire lead section was dropped while the output still looked well-formed. A shipped recipe (claude-blog-split-body) now names both containers via the new select.content. The Trafilatura auto-pick could not catch this on its own: its output carried the full text but no markdown headings, and pickBest requires at least one heading before preferring the longer candidate.

Full changelog: https://github.com/AeternaLabsHQ/pullmd/blob/main/CHANGELOG.md