Expand description
Generic utility functions
Functionsยง
- calculate_
sha256 - Calculate the SHA256 hash of
contentand return it as a 64-character lowercase hex string (the standard hex encoding of the 32-byte digest). - current_
timestamp - Get current Unix timestamp in seconds
- env_
flag_ enabled - Whether the environment variable
var_nameis set to an affirmative flag. - extract_
readme_ excerpt - Get the first meaningful section of the README/markdown as an excerpt
- extract_
toml_ str - Extract a string value from a simple TOML key assignment within the
[package]section - parse_
bool_ env_ value - Parse a boolean env-var value, returning
Nonewhen unrecognized. - parse_
env_ bool - Read the environment variable
nameas a boolean, returningdefaultwhen it is unset or unrecognized. - safe_
replace_ text - Safe text replacement with validation