/Log_Generators

Parse work log emails, from slack channels.

Primary LanguagePythonMIT LicenseMIT

Log-Generator

For work logs, each task completed is sent as a message within a private slack channel. Using the SlackAPI module for python, scripts parse slack messages into a work log that is sent through an email. Emails are sent using the SMTP, EMAIL modules for python. Scripts are run from AWS Lambda, triggered by a CloudWatch event scheduled to run daily.

The DIT script also includes functionality for querying events from a Microsoft Outlook calendar. Scheduling for this log changes daily. The script checks Outlook calnedra for a work shift. If a work shift is found for a given day, a CloudWatch event gets scheduled to trigger the Lambda function.

  • ERC LOG: Scheduled to run at a fixed rate, as configured on AWS CloudWatch.
  • DIT LOG: CloudWatch event triggers are scheduled according to Microsoft Outlook calendar events.

picture picture

Running on AWS, Locally

NOTE: There are two main functions declared in each script. The top function is named "lambda_handler. The second is named "main", with the accompanying "if name=='main'".

If scripts are to be run using Amazon Web Services, comment out the "main" function and the accompanying "if name=='main'". The "lambda_handler" should not be commented out.

If scripts are to be run on a local machine, comment out the "lambda_handler" function. The "main" function and the accompanying "if name=='main' should not be commented out."

Built With

  • Python 3 - High-level programming language for general-purpose programming.
  • Slack API package - Slack Developer Kit for Python.
  • Cronofy API - provides a unified calendar API to allow application developers to integrate their apps.
  • Python Email - An email and MIME handling package.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details