Feature Request: Decode Quoted-Printable Filter

I'd like to suggest adding a filter to decode quoted-printable content. It would be a nice complement to the MailRawSource token; together, they'd be great for grabbing the source of an email and preparing it for further processing.

Below are some examples of tasks that could be simplified with a built-in decode QP filter:

(Edited to clarify: the following are just some examples of tasks I already do once I have the raw, decoded source of an email message; I'm not suggesting any of these things be added as built-in Keyboard Maestro features. Their only relation to this post is that my method of doing these things would be greatly simplified if KM had a built-in filter to decode quoted-printable content.)

  • Extract all links from an email.
  • Check if all links in an email use HTTPS.
  • Review any URL queries/parameters from an email.
  • Get image sources from an email.
  • Check the alt text and title of images in an email.
  • Extract the HTML from an email for viewing in a browser.
  • Show the preview/preheader text of an email.

If it would be at all helpful, here are a couple GitHub repositories related to the quoted-printable format:

It may also make sense to add an "Encode to Quoted-Printable" filter as well, but I think the decode filter would be more useful.

Of course, if anyone has tips about an existing method to decode quoted-printable content in Keyboard Maestro, I'd love to see it!

What would be the point in getting all the alt text and titles of images in an email if you can't see exactly which image the text came from? KM can't pass images as parameters, so I'm not sure how this could be useful. Are you asking for images to be passable as parameters?

When you say "from/in an email" do you mean "from a KM variable whose contents contain the body of an email message" or do you want KM to be capable of understanding all the structure and components of en email? If so, just Apple Mail, or more than one email client?

Thank you for asking those questions! They helped me realize that I may not have been clear enough in my original post. The things I listed are just some examples of tasks I already do once I have the raw, decoded source of an email message; I'm not suggesting any of those things be added as built-in Keyboard Maestro features. Their only relation to this topic is that my method of doing them would be greatly simplified if KM had a built-in filter to decode quoted-printable content.

This is something I do when building or testing HTML emails. I like to be able to quickly check that all image elements have alt text and titles for accessibility reasons. With the raw, decoded source of an email message, I can use regex queries to get a list of image paths/filenames, alt text, and titles, letting me tell at a glance whether anything is missing and whether there are any typos or other issues.

This feature request exclusively relates to adding a "Decode Quoted-Printable" option to the existing Filter action, which already has some similar options such as Encode/Decode HTML Entities, Percent Encode/Decode for URL, and Encode/Decode Base64. In my case, I often use the MailRawSource token to save the contents of the currently selected message in Apple Mail to a variable, which I can then process in whatever way is needed.

I didn't realize you already had a working macro(s) to perform your filters. In that case, you may be able to use a KM feature that I haven't yet used. There's a special Macro Group called Clipboard Filters, and if you add your existing macros into that folder, your existing filters will be added to a menu that appears in the Clipboard History Switcher. If your macros are compliant with the needs of that folder, you can upload and share your filters, and if people like them, there's a chance KM could add them to that Macro Group for everyone to use.

The Clipboard Filters feature sounds very interesting, and I'll be sure to try it out! Thank you for the tip.