uchicago-library / attachment-converter

Attachment Converter: tool for batch converting attachments in an email mailbox
GNU General Public License v2.0
8 stars 3 forks source link

Attachment Converter should not print before/after skeleton when it doesn’t convert #91

Closed bufordrat closed 5 months ago

bufordrat commented 6 months ago

Currently, when attc finds an attachment whose MIME type it doesn’t recogize, it prints the before and after skeletons (which are identical).

Example involving an email one of whose attachments has MIME type text/calendar:

$ attc --single-email < calendar_email.eml 
Parsing email...
Processing email with structure...
=================================
Multipart
|-- Body
|-- Attachment: "event.vcs"
|-- Attachment: "event.ics"
=================================
Email now has structure...
=================================
Multipart
|-- Body
|-- Attachment: "event.vcs"
|-- Attachment: "event.ics"
=================================
Processing complete.

...the rest of the output...

What attc should do is print the original email to standard out with no email skeleton info. For this issue, please amend Attachment Converter so that it only prints skeleton information for emails that it is converting.