Expand description
Small utility helpers for encoding, JSON extraction, ranking, and time formatting.
The functions in this module are intentionally lightweight and dependency-free to keep hot paths fast and reduce compile times. They are used by networking, indexing, and UI code.
Modules§
- config
- Configuration file parsing utilities.
- curl
- Curl-based HTTP utilities for fetching JSON and text content.
- pacman
- Pacman command execution utilities.
- srcinfo
- .SRCINFO fetching utilities for AUR packages.
Functions§
- arrs
- What: Extract an array of strings from a JSON object by trying keys in order.
- curl_
args - Build curl command arguments for fetching a URL.
- ensure_
mouse_ capture - What: Ensure mouse capture is enabled for the TUI.
- fuzzy_
match_ rank - Rank how well a package name matches a query using fuzzy matching (fzf-style).
- fuzzy_
match_ rank_ with_ matcher - Rank how well a package name matches a query using fuzzy matching (fzf-style) with a provided matcher.
- match_
rank - What: Rank how well a package name matches a query (lower is better).
- open_
file - What: Open a file in the default editor (cross-platform).
- open_
url - What: Open a URL in the default browser (cross-platform).
- parse_
update_ entry - What: Parse a single update entry line in the format “name -
old_version-> name -new_version”. - percent_
encode - What: Percent-encode a string for use in URLs according to RFC 3986.
- repo_
order - What: Determine ordering weight for a package source.
- s
- What: Extract a string value from a JSON object by key, defaulting to empty string.
- ss
- What: Extract the first available string from a list of candidate keys.
- today_
yyyymmdd_ utc - What: Return today’s UTC date formatted as
YYYYMMDDusing only the standard library. - ts_
to_ date - What: Convert an optional Unix timestamp (seconds) to a UTC date-time string.
- u64_of
- What: Extract an unsigned 64-bit integer by trying multiple keys and representations.