Furst/Cargo.toml
nak0x 6dcb00da80 Add furst-read, an article extractor and minimal renderer
Fetches a page, discards everything that is not the article, and renders
what is left as a self-contained HTML document with no scripts, no
stylesheets, no webfonts and no third-party requests. The reader rule in
the starter config already points at it.

Extraction follows Readability: score p/pre/td/blockquote by prose weight,
propagate to ancestors with decay, adjust by class and id names, scale by
one minus link density, then take the winner plus sibling nodes that also
read like body copy. Serialisation runs against a tag whitelist, with
unlisted elements contributing their children but no tag of their own, so
wrapper divs disappear.

Handling for what real pages actually do:

- follow meta http-equiv=refresh stubs, including inside noscript
- fall back to data-src when src holds a lazy-load placeholder
- take the first srcset candidate, the smallest, not the last
- decode via Content-Type charset, then meta charset, then UTF-8
- resolve links against the post-redirect URL so file:// output works
- ignore script and style text so a page cannot inflate its own score

Output goes to a cache file named by a hash of the URL and opens in
$FURST_BROWSER, $BROWSER, or the first light browser on $PATH; --html,
--text, --out and --stdin cover the other uses.

Restructures the repository as a workspace so the router keeps its two
dependencies and its fast build.
2026-09-06 19:35:30 +02:00

20 lines
400 B
TOML

[workspace]
members = ["furst-read"]
[package]
name = "furst"
version = "0.1.0"
edition = "2024"
description = "Route URLs to the cheapest tool that can handle them"
[dependencies]
serde = { version = "1", features = ["derive"] }
toml = { version = "0.8", default-features = false, features = ["parse"] }
[profile.release]
opt-level = "s"
lto = true
codegen-units = 1
panic = "abort"
strip = true