Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 2000 emails - printing, sorting by date
Date: Thu, 18 Aug 2016 06:40:02
Message-Id: 1855159D-4A7F-4E1E-A233-571EEC2E6C2F@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-user] 2000 emails - printing, sorting by date by Daniel Quinn
1 > On 17 Aug 2016, at 15:12, Daniel Quinn <gentoo@×××××××××××.org> wrote:
2 >
3 > I’m a Python guy, so my answer to this would be "use Python" :-)
4 >
5 > [The ReportLab library](https://www.reportlab.com/docs/reportlab-userguide.pdf <https://www.reportlab.com/docs/reportlab-userguide.pdf>) is extremely powerful and can be used to generate a PDF for every email or a pdf for all emails. I've not used it myself, but I hear it's very good.
6 >
7 > …
8 >
9 > At that point you have a sorted list of email objects which you can then use ReportLab to generate a PDF.
10
11
12 That's a little more complicated than I hoped for.
13
14 I've not used Python before. Although I'd not be opposed to learning it, it's not clear to me how I'd get ReportLab to generate a PDF from an email.
15
16 I was not expecting to involve myself with decisions about fonts and heading sizes. I thought, perhaps optimistically, that there must be a command-line program to take a text email file and (discarding the unneeded headers) print it (to `lpr` or a postscript file) in formatting like the attached, just like my desktop email client does.
17
18 It surprises me to think that pretty-printing an email from the command-line is something that's not been done before, but my searches are not finding relevant results.
19
20 Stroller.

Attachments

File name MIME type
Lorem ipsum email.png image/png

Replies

Subject Author
Re: [gentoo-user] 2000 emails - printing, sorting by date "Håkon Alstadheim" <hakon@×××××××××××××××.no>