Since Pocketbook has some problems with extracting metadata correctly from EPUB files, this program tries fix these issues. https://www.rustysoft.de/software/pbdbfixer/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PbDbFixer/src/pocketbook.rs

31 lines
632 B

use std::process::Command;
static DIALOG_PATH: &str = "/ebrmain/bin/dialog";
#[allow(dead_code)]
pub enum Icon {
None = 0,
Info,
Question,
Attention,
X,
WLan,
}
pub fn dialog(icon: Icon, text: &str, buttons: &[&str]) -> i32 {
let iconstr = match icon {
Icon::None => "0",
Icon::Info => "1",
Icon::Question => "2",
Icon::Attention => "3",
Icon::X => "4",
Icon::WLan => "5",
};
let res = Command::new(DIALOG_PATH)
.args([&[iconstr, "", text], buttons].concat())
.output()
.unwrap();
res.status.code().unwrap_or(-1)
}