Skip to content

Commit

Permalink
Remove code formatted module reference headings
Browse files Browse the repository at this point in the history
(I don't think it looks very good)
  • Loading branch information
PeterWarrington committed Jul 9, 2022
1 parent 655ee7f commit 6d2b9de
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@ python3 olmConvert.py <path to OLM file> <output directory> [--noAttachments]

## Module reference

### `convertOLM(olmPath, outputDir, noAttachments=False)`
### convertOLM(olmPath, outputDir, noAttachments=False)
Convert OLM file specified by `olmPath`, creating a directory of EML files at `outputDir`. Will not include attachments if optional parameter `noAttachments` is set to True.

### `processMessage(xmlString, olmZip=None, noAttachments=False)`
### processMessage(xmlString, olmZip=None, noAttachments=False)
Reads OLM format XML message (`xmlString`) and returns a ConvertedMessage object containing the message converted to a EML format string. Can also return ValueError.

`olmZip` parameter is a instance of `zipfile.ZipFile` open on the OLM file. This parameter is required in order to convert attachments.

If `noAttachments` parameter is True, no attachments will be included in generated EML messages.

### `headerEncode(value)`
### headerEncode(value)
Converts email header string value to RFC2047 base64 encoded UTF-8 string (<https://datatracker.ietf.org/doc/html/rfc2047>).

### `addressEncode(addressElm)`
### addressEncode(addressElm)
Converts `<emailAddress>` element ([xml.etree.ElementTree.Element](https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element)) to an email header value.

### `generateBoundaryUUID()`
### generateBoundaryUUID()
Generates a MIME boundary ID (<https://datatracker.ietf.org/doc/html/rfc2046#section-5.1.1>).

### `lineWrapBody(body)`
### lineWrapBody(body)
Wraps lines of a given HTML body to maximum of 78 characters as recommended by RFC 2822 (https://datatracker.ietf.org/doc/html/rfc2822#section-2.1.1).

### `processAttachment(attachmentElm, olmZip)`
### processAttachment(attachmentElm, olmZip)
Generates EML section (without MIME boundaries) specifying attachments.

`attachmentElm` specifies the `<messageAttachment>` OLM element ([xml.etree.ElementTree.Element](https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element)) containing the attachment.
Expand Down

0 comments on commit 6d2b9de

Please sign in to comment.