@@ 16,8 16,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
.description(
"glyph's RSS feed. Biophilic musings on carbon-based and silicon-based technologies.",
)
.build()
.unwrap();
.build()?;
// list template directories containing articles for syndication
let bacteria = "./templates/bacteria";
@@ 46,7 45,11 @@ fn main() -> Result<(), Box<dyn error::Error>> {
// populate item url vector from article filenames
let re_url = Regex::new("./templates/(.*).html.tera")?;
let caps_url = re_url.captures(&path.to_str().unwrap());
let caps_url = re_url.captures(
&path
.to_str()
.expect("Failed to convert file path to string slice for regex capture"),
);
if let Some(url) = caps_url {
let article_url = url[1].replace("_", "-");
let full_url = format!("https://mycelial.technology/{}", article_url);