htb_cli/lib.rs
1pub mod api;
2pub mod cache;
3pub mod cli;
4pub mod config;
5pub mod error;
6pub mod mcp;
7pub mod models;
8pub mod output;
9
10use std::path::Path;
11
12pub fn sanitize_filename(raw: &str, fallback: &str) -> String {
13 Path::new(raw)
14 .file_name()
15 .map(|n| n.to_string_lossy().to_string())
16 .unwrap_or_else(|| fallback.to_string())
17}