Learn R Programming

bdpar (version 1.0.1)

ExtractorEml: Class to handle email files with eml extension

Description

This class inherits from the Instance class and implements the functions of extracting the text and the date from an eml type file.

Usage

ExtractorEml

Arguments

Constructor

ExtractorEml$new(path)

  • Arguments:

    • path: (character) path of the eml type file.

Inherit

This class inherits from Instance and implements the obtainSource and obtainDate abstracts functions.

Methods

  • obtainDate: obtains the date of the eml file. Calls the function read_emails and obtains the date of the file indicated in the path and then transforms it into the generic date format, that is "%a %b %d %H:%M:%S %Z %Y" (Example: "Thu May 02 06:52:36 UTC 2013").

    • Usage: obtainDate()

  • obtainSource: obtains the source of the eml file. Calls the function read_emails and obtains the source of the file indicated in the path. In addition, it initializes the data with the initial source.

    • Usage: obtainSource()

  • getPartSelectedOnMPAlternative: gets of PartSelectedOnMPAlternative variable.

    • Usage: getPartSelectedOnMPAlternative()

    • Value: value of PartSelectedOnMPAlternative variable.

  • setPartSelectedOnMPAlternative: sets of PartSelectedOnMPAlternative variable.

    • Usage: setPartSelectedOnMPAlternative(PartSelectedOnMPAlternative)

    • Arguments:

      • PartSelectedOnMPAlternative (character) the new value of PartSelectedOnMPAlternative variable.

Private fields

  • PartSelectedOnMPAlternative: (character) configuration to read the eml files. Indicates whether the text/plain part or the text/html part is read in multipart emails.

Details

The way to indicate which part to choose in the email, when is a multipart email, is through the configuration file which contains the following structure (being YourPartSelected, text/plain or text/html):

[eml]

PartSelectedOnMPAlternative = YourPartSelected (text/html or text/plain)

See Also

ExtractorSms, ExtractorTwtid, ExtractorYtbid, Instance