mirror of
https://github.com/thegeneralist01/archivr
synced 2026-07-22 11:15:41 +02:00
* Add SQLite metadata database support * Implement archive metadata database * chore: let's guess cargoHash because there's something wrong with nixpkgs! * Gate test-only database helpers behind cfg(test) * Fix archive database row identity * Use serde for archive metadata JSON * Finalize archive runs at command level * Handle archive command errors without panics * Cover tweet entry metadata recording * Document static regex invariants * docs: add web UI design spec * docs: add web UI implementation plan * chore: move cli into workspace crate * chore: track workspace crates directory * refactor: extract archive core crate * refactor: add core archive opening APIs * refactor: rename taxonomy model to tags * feat: add archive query APIs * feat: add web server registry * feat: expose archive server APIs * feat: add archive table web UI * fix: complete web UI smoke path * docs: add architecture mental model * docs: remove private superpowers plans * nix: split cli and server packages * chore: remove PLAN.md
8 lines
265 B
Rust
8 lines
265 B
Rust
/// Returns the tweet ID if `id` is non-empty and contains only ASCII digits.
|
|
pub fn parse_tweet_id(id: &str) -> Option<String> {
|
|
if !id.is_empty() && id.chars().all(|char| char.is_ascii_digit()) {
|
|
Some(id.to_string())
|
|
} else {
|
|
None
|
|
}
|
|
}
|