3ICQOMSTUVDMLYEHPR4FPE7PH33B2NPXVGXEVQOX7KWD6RMR3LIAC
}
pub fn get_tags(content: &str) -> Result<Vec<String>, Box<dyn Error>> {
let fname = content.replace("todo:", "");
let f = File::open(fname)?;
let mut reader = BufReader::new(f);
for line in reader.lines() {
if let Ok(cont) = line {
if cont.starts_with("* tags:") {
return Ok(cont
.trim_start_matches("* tags:")
.trim_start_matches(" ")
.split(",")
.map(|blubb| String::from(blubb))
.collect());
}
} else {
return Err(Box::from("I/O failed"));
}
}
Err(Box::from("tags not found"))