Exemplo n.º 1
0
 def __init__(self):
     desc = self.DESCRIPTION + self.FORMAT_DESC + \
            GeneralProcessor.get_formats()
     parser = ArgumentParser(description=desc,
                             formatter_class=RawDescriptionHelpFormatter)
     parser = Messages.add_possible_arguments(parser)
     parser = GeneralProcessor.add_possible_arguments(parser)
     self.parser = parser
Exemplo n.º 2
0
import sys

from processors.general_processor import GeneralProcessor
from processors.arguments import ArgumentsProcessor

# Min supported python version 2.7.10 in hex (argparse dep)
MIN_PYTHON_VER = 34015984

if __name__ == '__main__':
    if sys.hexversion < MIN_PYTHON_VER:
        print("ERROR: You must run this script with python 2.7.10 or greater")
        exit(1)

    kwargs = vars(ArgumentsProcessor().get_arguments())
    # Process messages and attachments
    processor = GeneralProcessor(**kwargs)
    processor.process_messages()
    processor.process_attachments()