commit 84989e10fb9698b366551500ae77fdef784f4d92 from: Omar Polo date: Wed Aug 24 10:40:57 2022 UTC export also the body of the message commit - f1ceade9f67fd8e6d5f2b278d97303fffd3f76c1 commit + 84989e10fb9698b366551500ae77fdef784f4d92 blob - bf6ca9f2b573e71a41fcd7ef97791b936c9fc5f6 blob + 2eac6c03f71e3970f22856ec0b085e1a03e6ef7e --- Makefile +++ Makefile @@ -13,6 +13,7 @@ all: .mblaze dirs assets dirs: mkdir -p ${OUTDIR}/mbox/ mkdir -p ${OUTDIR}/parts/ + mkdir -p ${OUTDIR}/text/ mkdir -p ${OUTDIR}/thread/ assets: dirs got.png style.css blob - 72c6a0607706032218ca0b1fdc2f00e262a4c498 blob + 14a383944d72862e8136b9b5e9877fce6811ba6c --- mexp +++ mexp @@ -95,6 +95,9 @@ while (<>) { open(my $mshow, "-|", "mshow", "-nNA", "text/plain", $fname) or die "can't exec mshow: $!"; + open(my $text, '>', "$outdir/text/$mid.txt") + or die "can't open $outdir/text/$mid.txt: $!"; + print $fh "
"; print $fh "

"; print $fh $logo; @@ -105,6 +108,7 @@ while (<>) { print $fh "

"; while (<$mshow>) { chomp; + say $text $_; last if /^$/; my ($h, $v) = m/^([-A-Za-z]+): (.*)/; die "bogus line? $fname : $_" unless (defined $h and defined $v); @@ -116,7 +120,8 @@ while (<>) { print $fh "
", san($v), "
"; } print $fh "
"; - print $fh "

Raw message

"; + print $fh "

Raw message"; + print $fh " or body.

"; print $fh "
"; my $body = do { @@ -125,10 +130,11 @@ while (<>) { }; print $fh "
";
-	# print $fh san($_) while <>;
 	print $fh san($body // "");
 	print $fh "
"; + print $text $body; + # generate the listing for the exported parts my $part_seen = 0; while (<$parts>) { @@ -142,6 +148,7 @@ while (<>) { print $fh $foot; + close($text); close($mshow); close($parts); close($fh);