pub struct Repub<Css, Trans> {
pub include_url: bool,
pub include_title: bool,
pub include_byline: bool,
pub include_cover: bool,
pub strip_links: bool,
pub href_sim_thresh: f64,
pub image_handling: ImageHandling,
pub css: Css,
pub transform: Trans,
pub epub_version: EpubVersion,
}Expand description
The main class for converting mhtml
Fields§
§include_url: boolif true, inclue the origin url at the top of the article
include_title: boolif true, add the article as an h1 tag preceeding the content
include_byline: boolif true, add the byline preceeding the content
include_cover: boolif true, add the cover image found preceeding the content
strip_links: boolif true, strip all links from the epub
href_sim_thresh: f64threshold for approximate url matching
Due to some bugs with chromiums renderer, some urls will be stripped from the final mhtml, and as a fallback this can be set to a value less then one to allow for approximate matching. 1.0 will accept any reasonable image, 0.0 only accepts complete matches and is significantly faster than any other setting.
image_handling: ImageHandlinghow to handle images
css: Cssoptional css content to render to the final epub
transform: Transfunction to transform images
epub_version: EpubVersionthe version of epub to write