Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update README.md
  • Loading branch information
James Macdonell committed Jul 2, 2024
commit 686cd805eb6780dabc69bc6010def81324b7b592
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,25 @@ to unpack HTML message bodies, and
back-fill plain text message bodies when only an HTML body
is present.

Install the dependencies with:

pip install -r requirements.txt
Install the package and dependencies with:
pip install .

(You may need to create and activate a Python virtual environment first.)

Then either convert a single file by piping:

python outlookmsgfile.py < message.msg > message.eml
outlookmsgfile < message.msg > message.eml

Or convert a set of files:

python outlookmsgfile.py *.msg
outlookmsgfile *.msg

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')
import outlookmsg
eml = outlookmsg.load('my_email_sample.msg')

The ``load()`` function returns an [EmailMessage](https://docs.python.org/3/library/email.message.html#email.message.EmailMessage) instance.
1 change: 1 addition & 0 deletions src/outlookmsg/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .stream import load