Пример #1
0
def main():
    creds = config.get_creds()
    sftp.download(creds.get("sftp_url"), creds.get("sftp_username"),
                  creds.get("sftp_password"), creds.get("localpath"))
    cleaner.clean(creds.get("localpath"))
    merge.merge(creds.get("localpath"))
    scraper.scrape(creds)
#!/usr/bin/env python

import os
import unittest
import config
from flask_sqlalchemy import SQLAlchemy
from flask import Flask

# Some repetitive code, is there anyway to import this?
CREDS = config.get_creds('envs.json', crypt=False)

app = Flask(__name__, static_url_path='/static')

app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = CREDS[
    'SQLALCHEMY_TRACK_MODIFICATIONS']
app.config['SQLALCHEMY_DATABASE_URI'] = CREDS['SQLALCHEMY_DATABASE_URI']
app.config['ADMIN_ROLE_ID'] = CREDS['ADMIN_ROLE_ID']
app.config['STANDARD_ROLE_ID'] = CREDS['STANDARD_ROLE_ID']

db = SQLAlchemy(app)

import Reward, Role, User, Chore, Recurrence
import ErrorHandler


class Test_RecurrenceTestCase(unittest.TestCase):
    def setUp(self):
        return

    def tearDown(self):
        return
Пример #3
0
def main():
    creds = config.get_creds()
    sftp.download(creds.get("sftp_url"), creds.get("sftp_username"), creds.get("sftp_password"), creds.get("localpath"))
    cleaner.clean(creds.get("localpath"))
    merge.merge(creds.get("localpath"))
    scraper.scrape(creds)
Пример #4
0
import User
import Reward
import SystemValues
import smtplib
import os
import config
from Log import Log, LogType
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import ssl

_log = Log()

basedir = os.path.dirname(os.path.realpath(__file__)) 

CONFIG = config.get_creds('envs.json', crypt=False)

def notifications_enabled():
    system_value_notifications = CONFIG['SYSTEM_VALUES_NOTIFICATIONS']
    notifications_enabled = (SystemValues.SystemValues.GetById(system_value_notifications)).value_bool
    return notifications_enabled

def check_due():
    overdue_list = []
    all_chores = Chore.Chore.GetAll()
    for c in all_chores:
        if c.IsOverdue():
            overdue_list.append(c)
    return overdue_list

def send_reward_claim_notice(reward=None, user=None, debug=True):
Пример #5
0
def main(argv):
    credentials = config.get_creds()
    http = credentials.authorize(httplib2.Http())
    service = discovery.build('calendar', 'v3', http=http)

    update_cal(service)