Skip to content

Commit

Permalink
Include dependencies by requirements.txt (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcsalvador authored and JoshData committed Sep 16, 2019
1 parent 73fac36 commit d4a5944
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 327 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ reading Microsoft Outlook .msg files and converting
them to .eml format, which is the standard MIME
format for email messages.

The module requires Python 3.6 and the [compoundfiles](https://pypi.python.org/pypi/compoundfiles)
package, so first install that:
Install the dependencies with:

pip3.6 install compoundfiles

We also rely on our Python 3 port of [compressed_rtf](https://github.com/delimitry/compressed_rtf), which is included in this repository.
pip3.6 install -r requirements.txt

Then either convert a single file by piping:

Expand All @@ -23,3 +20,10 @@ Or convert a set of files:

When passing filenames as command-line arguments, a new file with `.eml`
appended to the filename is written out with the message in MIME format.

To use it in your application

import outlookmsgfile
eml = outlookmsgfile.load('my_email_sample.msg')

The ``load()`` function returns an [EmailMessage](https://docs.python.org/3/library/email.message.html#email.message.EmailMessage) instance.
224 changes: 0 additions & 224 deletions compressed_rtf.py

This file was deleted.

98 changes: 0 additions & 98 deletions crc32.py

This file was deleted.

2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
compoundfiles
compressed-rtf
28 changes: 28 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import setuptools

install_requires = [
'compoundfiles',
'compressed_rtf',
]

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name='convert-outlook-msg-file',
version='0.1.0',
description='Parse Microsoft Outlook MSG files',
author='Joshua Tauberer',
author_email='[email protected]',
url='https://github.com/JoshData/convert-outlook-msg-file',
packages=setuptools.find_packages(),
install_requires=install_requires,
long_description=long_description,
long_description_content_type="text/markdown",
python_requires='>=3.6',
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)

0 comments on commit d4a5944

Please sign in to comment.