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

7 implement convert #18

Closed cormacd9818 closed 2 years ago

cormacd9818 commented 2 years ago

With the conversion scripts, 'convert' only needs the script and the string to be converted which will be sent to stdin. It's important that the raw binary be read from stdin since bash has issues handling raw binary (ie. parameter expansion reformatting). Unix.Proc.rw handles both the reading and writing from stdin and stdout, so 'convert' itself should be straightforward.

nmmull commented 2 years ago

Because of the changes in the shell command specification, I think you have to Prelude.split the command before throwing it into rw.

cormacd9818 commented 2 years ago

Because of the changes in the shell command specification, I think you have to Prelude.split the command before throwing it into rw.

Thanks, Nathan--just added that now.