pacsea/sources/news/mod.rs
1//! Arch Linux news fetching and parsing.
2
3mod aur;
4mod cache;
5mod fetch;
6mod parse;
7mod utils;
8
9/// Result type alias for Arch Linux news fetching operations.
10type Result<T> = super::Result<T>;
11
12pub(crate) use fetch::fetch_arch_news_with_context;
13pub use fetch::{fetch_arch_news, fetch_news_content};
14pub use parse::parse_arch_news_html;
15
16/// What: Parse raw news/advisory HTML into displayable text (public helper).
17///
18/// Inputs:
19/// - `html`: Raw HTML source to parse.
20///
21/// Output:
22/// - Plaintext content suitable for the details view.
23#[must_use]
24pub fn parse_news_html(html: &str) -> String {
25 parse_arch_news_html(html, None)
26}
27
28#[cfg(test)]
29mod tests;
30
31#[cfg(test)]
32mod tests_aur;