Re: [Interest] Qt classes to print email to pdf from message in mbox format?
Thanks Shawn, On Tue, Nov 7, 2023 at 11:47 AM Shawn Rutledge via Interest wrote: > > > On 7 Nov 2023, at 09:28, Jeffrey Walton wrote: > > > > I've been lurking a while to collect information for an upcoming > > project. I have not seen a similar topic, so I'm going to ask... > > > > I have a collection of email messages in mbox format. I obtain them > > from GMail, and Export Data operation. I can parse them into > > individual messages. For each message, I need to virtually display > > them in a Html-like view, and then print them to a pdf. > > > > Lurking and Google search is not turning up useful results. I saw KDE > > has some gear, like KMBox::MBox, but I want to stay in Qt. > > > > My question is, does Qt offer any support for mbox format? > > Not that I know of, but I’m sure you can find some C++ code somewhere. > > > Or rich > > email messages? > > Or do I need to extract the html parts of the message, and then supply > > a string to QTextBrowser? > > QTextBrowser’s HTML support is not very modern or complete. If you are not > satisfied with the rendering, maybe it’s better to use Qt Webengine. On the > other hand, in that case let’s hope you trust the senders. It’s becoming > rather insecure to let a browser download every remote image etc. that is > referenced in every HTML email; so in my mail clients I usually have that > feature turned off by default, so that there’s a button to optionally > download inline images only occasionally. Thank you sir. > This sounds like something to try in Python rather than C++: it sounds like a > “scripty” thing to do rather than a long-lived application, you can use Qt, > and you can probably find code for mbox pretty easily too. I had to chuckle when I read the Python comment. I don't have Python or Perl skills. I go from slow (shell scripts) to fast (C++, Java and Go). There's no in-between. Lack of Python skill is such a pain point. Jeff ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Qt classes to print email to pdf from message in mbox format?
> On 7 Nov 2023, at 09:28, Jeffrey Walton wrote: > > Hi Everyone, > > I've been lurking a while to collect information for an upcoming > project. I have not seen a similar topic, so I'm going to ask... > > I have a collection of email messages in mbox format. I obtain them > from GMail, and Export Data operation. I can parse them into > individual messages. For each message, I need to virtually display > them in a Html-like view, and then print them to a pdf. > > Lurking and Google search is not turning up useful results. I saw KDE > has some gear, like KMBox::MBox, but I want to stay in Qt. > > My question is, does Qt offer any support for mbox format? Not that I know of, but I’m sure you can find some C++ code somewhere. > Or rich > email messages? > Or do I need to extract the html parts of the message, and then supply > a string to QTextBrowser? QTextBrowser’s HTML support is not very modern or complete. If you are not satisfied with the rendering, maybe it’s better to use Qt Webengine. On the other hand, in that case let’s hope you trust the senders. It’s becoming rather insecure to let a browser download every remote image etc. that is referenced in every HTML email; so in my mail clients I usually have that feature turned off by default, so that there’s a button to optionally download inline images only occasionally. This sounds like something to try in Python rather than C++: it sounds like a “scripty” thing to do rather than a long-lived application, you can use Qt, and you can probably find code for mbox pretty easily too. ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Qt classes to print email to pdf from message in mbox format?
Hi Everyone, I've been lurking a while to collect information for an upcoming project. I have not seen a similar topic, so I'm going to ask... I have a collection of email messages in mbox format. I obtain them from GMail, and Export Data operation. I can parse them into individual messages. For each message, I need to virtually display them in a Html-like view, and then print them to a pdf. Lurking and Google search is not turning up useful results. I saw KDE has some gear, like KMBox::MBox, but I want to stay in Qt. My question is, does Qt offer any support for mbox format? Or rich email messages? Or do I need to extract the html parts of the message, and then supply a string to QTextBrowser? Jeff ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest