home.social

#geekallweek — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #geekallweek, aggregated by home.social.

fetched live
  1. I had been using Nick Russler's Java-based email-to-pdf-converter to shove EML to PDF but it relies on a very specific, unmaintained patch of wkhtmltopdf, so I went hunting for an alternative to wkhtmltopdf. Ultimately, Nick's fantastic tool uses an iframe and some JavaScript to cram the email headers into the beginning of the HTML that is ultimately converted to PDF, and using other tools for the HTML conversion introduces a variety of bugs, annoyances, or just lack of support for the JS for that iframe.

    Thankfully, I found Pieter Lenaerts' Python-based eml2pdf, which is very fast and only has one bug: no time zone indication in the date in the header. It looks easy enough to patch with my wee Python skills, and I might try to make it respect the local TZ environment variable so you can push it to UTC or local time depending on your target audience. I don't know if I want to bother with handling the date conversion for the automatic file naming or not. Left as an exercise for the reader?

    I also tried Stirling PDF, which is overkill but slick, and embeds the email attachments into the PDF (for better or worse), but the header formatting is horrible and it doesn't look like the page size is adjustable (from the console, anyway). It would also require hitting its API for any bulk conversions.

    #InfoSec #GeekAllWeek

  2. @knapjack @#GeekAllWeek@bonk.cozysumo.space @#RollYourOwn@bonk.cozysumo.space @#BangleJS@bonk.cozysumo.space that’s very cool. I like this interface.