#epub #remarkable #mhtml

bin+lib repub-rs

Rust library and binary for converting mhtml webpages into remarkable-style summarized epubs

3 unstable releases

0.2.0 May 2, 2024
0.1.2 Apr 24, 2024
0.1.1 Nov 20, 2023
0.1.0 Sep 5, 2023

#600 in Text processing

Download history 35/week @ 2024-02-24 26/week @ 2024-03-02 14/week @ 2024-03-30 122/week @ 2024-04-20 187/week @ 2024-04-27 12/week @ 2024-05-04

321 downloads per month

MIT license

38KB
788 lines

repub-rs

A rust library for converting mhtml webpages to epub articles.

To Do

  • Handling of byline and title is a bit manual, and it'd be better to expose more of those properties.

lib.rs:

A library for turning mhtml webpages into summarized epub articles

This is primarily intended for use in repub for reMarkable devices, but can be generally used for webpage summarization.

Examples

use repub::Repub;

let mhtml = // ...
# r#"From: <Saved by Blink>
# Snapshot-Content-Location: http://test
# Subject: title
# MIME-Version: 1.0
# Content-Type: multipart/related;
#    type="text/html";
#    boundary="boundary"
#
# --boundary
# Content-Type: text/html
# Content-ID: <frame-0@mhtml.blink>
# Content-Transfer-Encoding: quoted-printable
# Content-Location: http://test
#
# <html></html>
# --boundary--
# "#;
let mut buff = Vec::new();
Repub::default().mhtml_to_epub(mhtml, &mut buff).unwrap();

Dependencies

~12–26MB
~391K SLoC