INNER CODE UNIT · Rust
Some
mouseart2025/AI-Reader-V2 · frontend/src-tauri/src/lib.rs:514
if let Some(fact) = facts_map.get(&chapter_num) {
let entities = extract_chapter_entities(fact);
chapter_data.insert("entities".to_string(), entities);
}
let padded = format!("ch-{:03}.json.gz", chapter_num);
write_json_gz(
&chapters_dir.join(padded),
&serde_json::Value::Object(chapter_data),
)?;
}
chs.len()
} else {
0
};
let stats = compute_novel_stats(precomputed);