This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from viniciusgava/feature/mail-gun-pushbullet-s…
…upport Mail Gun, Push Bullet Support. Invalid username and password validate
- Loading branch information
Showing
21 changed files
with
635 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import argparse | ||
import logging | ||
import sys | ||
import time | ||
|
||
from automate.downloader import Downloader | ||
from integration.mailgun import Mailgun | ||
from integration.pushBulletNotification import PushBulletNotification | ||
|
||
parser = argparse.ArgumentParser("app") | ||
parser.add_argument('env', help='local or docker env', default='local') | ||
|
||
args = parser.parse_args() | ||
env = args.env | ||
|
||
if env == 'docker': | ||
import settings.docker as settings | ||
else: | ||
import settings.local as settings | ||
|
||
# Configure logger | ||
logger = logging.getLogger('app') | ||
logger.setLevel(logging.DEBUG) | ||
ch = logging.StreamHandler(sys.stdout) | ||
ch.setLevel(logging.DEBUG) | ||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | ||
ch.setFormatter(formatter) | ||
logger.addHandler(ch) | ||
|
||
# Sleep | ||
time.sleep(1) | ||
|
||
downloader = Downloader(settings, logger) | ||
result = downloader.run() | ||
|
||
if result: | ||
mailgun = Mailgun(settings, logger) | ||
mailgun.send() | ||
|
||
push_bullet = PushBulletNotification(settings, logger) | ||
push_bullet.push() |
File renamed without changes.
Oops, something went wrong.