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

Make Email Backend Configurable #75

Closed bufordrat closed 1 month ago

bufordrat commented 1 year ago

Currently, to switch between Mr. Mime and Ocamlnet as backends, all you have to do is change this line in convert.ml:

module Converter = Ocamlnet_Converter

To this:

module Converter = Mrmime_Converter

For this issue, make the email backend an option in the configuration file (or in a command line flag, or both) and set the value of the Converter module according to what is in the configuration file. In the config file case, it could look something like this:

%backend mrmime

In the command line flag case, it could look approximately like this:

$ attc --backend=mrmime < input.mbox > output.mbox