cooklang-import 0.1.2

A tool for importing recipes into Cooklang format
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::model::Recipe;
use scraper::Html;

mod json_ld;

pub use self::json_ld::JsonLdExtractor;

pub trait Extractor {
    fn can_parse(&self, document: &Html) -> bool;
    fn parse(&self, document: &Html) -> Result<Recipe, Box<dyn std::error::Error>>;
}