Commit Graph

73 Commits

Author SHA1 Message Date
Peter J. Holzer dfdfb289b2 Move css level further up to compensate for per-list directories
We want each list archive to be in a separate directory but we still
want a common style for all, so we have to go up one more level.
2020-06-14 20:29:18 +02:00
Peter J. Holzer 14130941c7 Handle empty from or subject 2020-06-14 20:28:20 +02:00
Peter J. Holzer b09e1b4613 Beautify 2020-04-17 01:01:26 +02:00
Peter J. Holzer 17e68334ca Mark the current message in the thread 2020-04-17 01:00:36 +02:00
Peter J. Holzer 8e1337bc8f Add links to the nodes in the thread graph
Currently it's just the nodes themselves which are kind of tiny and hard
to hit. Probably should add some invisible overlay.
2020-04-17 00:57:11 +02:00
Peter J. Holzer 15c70e6836 Split calendar view into months
There is one overview page with one entry per month (currently the
longest thread, could also be an abbreviated list of threads, but not
all of the threads (or we are back where we started).The entries link to
the monthly pages which contain links to all threads with at least one
mail in that month.
2020-04-17 00:53:07 +02:00
Peter J. Holzer 10ce9fad8b Escape from and subject 2020-04-15 21:39:56 +02:00
Peter J. Holzer 6fa5f0ab2e Start luga style (based on my 2018 design) 2020-04-13 13:13:21 +02:00
Peter J. Holzer 6923e6273a Merge thread-handling from mbox2threads into mbox2web 2020-04-12 23:08:10 +02:00
Peter J. Holzer 1ada1c3817 Add test program for threading algorithm 2020-04-05 16:21:46 +02:00
Peter J. Holzer 29b5288519 Clean up and include style sheets 2019-10-31 21:22:03 +01:00
Peter J. Holzer b86ae9cb3f Handle div and span elements 2019-06-18 23:14:18 +02:00
Peter J. Holzer c9a336e58f Handle cite attribute 2019-06-18 22:11:23 +02:00
Peter J. Holzer 589a217b1b Handle application/pgp-keys 2019-06-17 20:59:23 +02:00
Peter J. Holzer 3865c5f887 Handle message/delivery-status 2019-05-20 23:59:26 +02:00
Peter J. Holzer 35e8266695 Remove magic number from image attachment templates
I have no idea what 1000 was meant to signify.
2019-05-20 23:26:43 +02:00
Peter J. Holzer 00ad5f864e Fix charset handling for text/html parts 2019-05-20 23:25:49 +02:00
Peter J. Holzer bdb5842d75 Handle image/svg+xml attachments 2019-05-20 23:16:30 +02:00
Peter J. Holzer 5e96a73744 Tolerate decoding errors
Sometimes the charset is just wrong, or it uses a non-standard name. Try
to do something useful in these cases.
2019-05-20 23:06:08 +02:00
Peter J. Holzer b1dbb3d40c Implement format=flowed and fix charset handling for text/plain 2019-05-20 00:32:33 +02:00
Peter J. Holzer 647e93afd5 Implement attachment application/pgp-signature
A detached signature doesn't make much sense in an email, but may happen
because of improper quoting. Or somebody might really want to send a
signature separate from the signed file.
2019-05-12 23:17:17 +02:00
Peter J. Holzer 55a1a1df83 Implement attachment text/x-perl 2019-05-12 23:11:21 +02:00
Peter J. Holzer 10fc5e2f61 Implement attachment application/vnd.oasis.opendocument.text 2019-05-12 23:06:52 +02:00
Peter J. Holzer c9ccb38eb9 Implement attachment application/x-compressed-tar 2019-05-12 22:58:41 +02:00
Peter J. Holzer b5316d056e Implement attachment text/x-c++src 2019-05-12 22:51:45 +02:00
Peter J. Holzer 057eba197e Implement attachment text/x-patch 2019-05-12 22:48:05 +02:00
Peter J. Holzer 308a34e6ca Implement attachment application/x-sh 2019-05-12 22:41:35 +02:00
Peter J. Holzer 9b49c740c6 Implement attachment text/x-java 2019-05-12 22:37:24 +02:00
Peter J. Holzer 709c87658b Implement attachment text/x-python 2019-05-12 22:18:55 +02:00
Peter J. Holzer f3bdaae445 Implement inline image/jpeg 2019-05-12 22:12:12 +02:00
Peter J. Holzer f8f64d3506 Allow cid's in multipart/mixed 2019-05-12 22:06:51 +02:00
Peter J. Holzer c84c517f62 Pass extra parameter to children of multipart/alternative
A structure like this is quite common:

  ─><no description>                    [multipa/related, 7bit, 12K]
   ├─><no description>              [multipa/alternativ, 7bit, 9.0K]
   │ ├─><no description>      [text/plain, quoted, iso-8859-1, 3.7K]
   │ └─><no description>       [text/html, quoted, iso-8859-1, 4.9K]
   └─>2b0063.jpg                          [image/jpeg, base64, 3.3K]

Here the main content of multipart/related isn't the html part, but a
multipart/alternative containing the html part and a text part. The html
part still needs access to the onther content of the multipart/related
part, so we need to pass this through.
2019-05-12 21:37:26 +02:00
Peter J. Holzer a44ff7ee4b Handle some more attachment types (some of them bogus) 2019-04-30 22:15:20 +02:00
Peter J. Holzer 8d78b2ec26 Handle RFC 2047 encoded headers 2019-04-30 21:55:21 +02:00
Peter J. Holzer 54290fb668 Handle application/x-shellscript attachments 2019-04-29 21:22:03 +02:00
Peter J. Holzer 2aadb830cd Handle application/x-bzip2 attachments 2019-04-29 21:18:00 +02:00
Peter J. Holzer 5294100b2c Handle multipart/related
For multipart related we need to be able to reference the other parts
from the root part by content-id, so we need to pass an argument with
the necessary information (imaginatively called "extra") to the render
function. Of course since this is called indirectly, every render
function needs to accept an extra argument, even if only
render_text_html uses it.
2019-03-31 23:48:57 +02:00
Peter J. Holzer 2a3e5622f3 Handle ms-tnef attachments
Like other attachments, just create a download link, don't try to parse
them.
2019-03-31 21:50:08 +02:00
Peter J. Holzer 865579655f Handle GIF attachments
Not sure whether providing a download link for attached images is the
right thing to do - we should probably just display them like inline
images. But we can always change that by a simple change of the
template.
2019-03-31 21:34:40 +02:00
Peter J. Holzer f543dbc5c8 Handle (old style) MS-Word attachments 2019-03-31 21:15:31 +02:00
Peter J. Holzer 08784b70fe Handle Perl attachments 2019-03-31 21:03:03 +02:00
Peter J. Holzer 0db91aaa5f Handle C attachments 2019-03-31 20:51:52 +02:00
Peter J. Holzer b2f56c1660 Handle underline in text/enriched 2019-03-17 22:42:44 +01:00
Peter J. Holzer 8acf092559 Fixed return values of all the new render functions
Oops. I should really check the output of the script, not just whether
it crashes in the expected place.
2019-03-17 22:30:27 +01:00
Peter J. Holzer 45848a73ae Handle multipart types that aren't 2019-03-17 22:24:17 +01:00
Peter J. Holzer b053ab454f Refactor render_body to handle each mime-type in a nested function
This replaces the giant elif cascade with a table lookup. It also allows
me to call one function from another.
2019-03-17 22:17:02 +01:00
Peter J. Holzer 035b4e1002 Limit width of text/enriched
60em is a bit more than 100 characters in the fixed-width font I use so
that should be an acceptable compromise between readability and avoiding
unintended line breaks.

The RFC says that output should use "the maximum available margins", but
that was clearly before large monitors became common.
2019-03-16 21:58:42 +01:00
Peter J. Holzer d5c5368bad Implement more text/enriched tags: nofill, param, ...
Nofill and param are handled specially by the parser. The parser now
also tolerates missing end tags.

Handle quite a few tags on output including some (like color and
fontfamily) that use a param.
2019-03-16 21:53:06 +01:00
Peter J. Holzer a997542cfe Handle image/gif (inline)
Inline images are very similar to attachments: We just want to store
them somewhere and refer to them. But we want to use a different element
(<img> instead of <a>) or more generally, a different template. So we
pass the disposition as an additional argument to save_part and use it
to construct the template name - which gives as a flurry of new
templates.
2019-03-10 23:27:30 +01:00
Peter J. Holzer df7fcb5777 Handle message/news 2019-03-10 22:47:10 +01:00