crabmail

Static HTML email archive viewer in Rust
git clone git://git.alexwennerberg.com/crabmail
Log | Files | Refs | README | LICENSE

commit bd69c0f6cc6fe1e9fc7f3200f845b47c1d773632
parent 44a2575bb643e1a56b1ded2514bd0810db01e1fa
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 20 Mar 2022 13:15:14 -0700

update gemini support

Diffstat:
MREADME.md | 3+--
MTODO | 1+
Msrc/arg.rs | 5++++-
Msrc/models.rs | 1+
4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -5,7 +5,7 @@ THROUGH COMMIT HISTORY [self-hosted](https://git.alexwennerberg.com/crabmail/) / [github mirror](https://github.com/alexwennerberg/crabmail) -A static mail HTML archive for the 21st century, written in Rust. Includes +A static mail HTML and [Gemini](https://gemini.circumlunar.space/) archive for the 21st century, written in Rust. Includes helpful "modern" features that existing solutions lack, like: * Responsive UI @@ -15,7 +15,6 @@ helpful "modern" features that existing solutions lack, like: Not implemented yet / designed: * Attachment handling? -* Gemini support EMAIL FOREVER! diff --git a/TODO b/TODO @@ -7,6 +7,7 @@ check for html escape bugz add date to generated string fix date fmt add "exclude html" flag +fix "to" in email export reference mblaze command, add examples to readme fix all the build warnings remove unused diff --git a/src/arg.rs b/src/arg.rs @@ -25,8 +25,9 @@ fn usage() -> ! { MAILDIR A directory containing the maildirs of lists you want to parse -FLAGS: +FLAGS: -g include gemini output +-h include HTML output ARGS: -c config file (crabmail.conf) @@ -43,6 +44,7 @@ pub struct Args { pub positional: Vec<OsString>, pub a: i32, // placeholder pub include_gemini: bool, + pub include_html: bool, pub no_index: bool, } @@ -70,6 +72,7 @@ impl Args { 'c' => out.config = parse_os_arg(args.next()), 'd' => out.out_dir = parse_os_arg(args.next()), 'g' => out.include_gemini = true, + 'h' => out.include_html = true, // Stop editing // _ => { usage(); diff --git a/src/models.rs b/src/models.rs @@ -149,6 +149,7 @@ impl StrMessage { message.format_flowed(); } let from = self.from.name.clone().unwrap_or(String::new()); + message.message_id(self.id.as_str()); message.from((from.as_str(), self.from.address.as_str())); // TODO fix to message.to("jane@doe.com");