use std::fs; use anyhow::{Result, Context}; use std::path::PathBuf; use rusqlite::{params, Connection, OptionalExtension}; use std::fs::File; use xml::reader::{EventReader, XmlEvent, ParserConfig}; use std::io::BufReader; use epub::doc::EpubDoc; use std::time::SystemTime; #[derive(Debug, Clone)] struct BookMeta { title: String, author: String, description: String } #[derive(Debug, Clone, Copy, PartialEq)] enum XMLReadState { None, ReadingTitle, ReadingAuthor, ReadingDescription } // Extract text from an XHTML page in an ebook // Ignores