Skip to content

Instantly share code, notes, and snippets.

@kadin2048
kadin2048 / emlToMbox.py
Last active November 4, 2024 05:43
Combine a directory of .eml files into a single Unix "mbox" file.
#!/usr/bin/env python3
""" Converts a directory full of .eml files to a single Unix "mbox" file.
This is similar to http://www.cosmicsoft.net/emlxconvert.html
Accepts as input either an individual .eml file or a directory containing one
or more .eml files.
Usage:
$ ./emlToMbox.py inputdir/ output.mbox
An error occurred while installing nokogiri (1.8.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.1'` succeeds before bundling.
In Gemfile:
activeadmin_settings_cached was resolved to 2.0.1, which depends on
rails-settings-cached was resolved to 0.5.6, which depends on
rails was resolved to 5.0.6, which depends on
actioncable was resolved to 5.0.6, which depends on
actionpack was resolved to 5.0.6, which depends on
actionview was resolved to 5.0.6, which depends on