Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report Feature: Display All Attachment Types #15

Closed
OwenPriceSkelly opened this issue Feb 16, 2022 · 0 comments · Fixed by #28
Closed

Report Feature: Display All Attachment Types #15

OwenPriceSkelly opened this issue Feb 16, 2022 · 0 comments · Fixed by #28
Assignees

Comments

@OwenPriceSkelly
Copy link
Collaborator

OwenPriceSkelly commented Feb 16, 2022

Report Feature: Display All Attachment Types

For this issue, implement the following two functions that 'query' an email for information:

val attachment_types : string -> string list
val mbox_attachments : string -> string list

attachment_types takes an email string as an input and outputs a list of the MIME type strings corresponding to all its attachments, e.g. ["application/pdf", "text/plain"]. This should be recursive, so that if the email has parts of parts of parts, and those have attachments, those all go into the output list. Might as well sort it in alphabetical order.

mbox_attachments does the same thing at the MBOX level. So given an MBOX string as an input, it returns a list of all the MIME types that appear anywhere in that input MBOX, in alphabetical order.

They can go in their own module called Report, either in Lib or in a separate file called lib/report.ml. The motivation behind putting them in their own module is that it seems likely we will be incorporating a bunch more "report" features into Attachment Converter, and they will eventually turn into command line options, or perhaps a subcommand.

@bufordrat bufordrat changed the title (draft issue) utility function to report unique attachment types found in given mbox archive Report Feature: Display All Attachment Types Mar 16, 2022
@nmmull nmmull linked a pull request Mar 30, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants