Example #1
0
def get_subscription_data():
    """Get subscription data from Firestore."""
    ref = 'public/subscriptions/subscription_plans'
    try:
        return get_data(REF, datafile='.datasets/subscriptions.json')
    except FileNotFoundError:
        return get_data(REF, datafile='../../.datasets/subscriptions.json')
Example #2
0
def get_article_data():
    """Get article data from Firestore."""
    ref = 'public/articles/article_data'
    try:
        return get_data(REF, datafile='.datasets/articles.json')
    except FileNotFoundError:
        return get_data(REF, datafile='../../.datasets/articles.json')
Example #3
0
def get_verification_data():
    """Get verification data from Firestore."""
    ref = 'public/verifications/verification_data'
    try:
        return get_data(REF, datafile='.datasets/verifications.json')
    except FileNotFoundError:
        return get_data(REF, datafile='../../.datasets/verifications.json')
def get_partner_data():
    """Get partner data from Firestore."""
    ref = 'public/partners/partner_data'
    try:
        return get_data(REF, datafile='.datasets/partners.json')
    except FileNotFoundError:
        return get_data(REF, datafile='../../.datasets/partners.json')
Example #5
0
def get_team_data():
    """Get team member data from Firestore."""
    ref = 'public/team/team_members'
    try:
        return get_data(REF, datafile='.datasets/team.json')
    except FileNotFoundError:
        return get_data(REF, datafile='../../.datasets/team.json')
def get_event_data():
    """Get event data from Firestore."""
    ref = 'public/events/event_data'
    try:
        return get_data(REF, datafile='.datasets/events.json')
    except FileNotFoundError:
        return get_data(REF, datafile='../../.datasets/events.json')
def get_video_data():
    """Get video data from Firestore."""
    ref = 'public/videos/video_data'
    try:
        return get_data(REF,
                        datafile='.datasets/videos.json',
                        order_by='number')
    except FileNotFoundError:
        return get_data(REF,
                        datafile='../../.datasets/videos.json',
                        order_by='number')
def main():
    data = d.get_data()
    d.save_data(data)
    decrypted = c.decrypt(data['cifrado'], data['numero_casas'])

    hashed = hashlib.sha1(decrypted.encode())

    data['decifrado'] = decrypted
    data['resumo_criptografico'] = hashed.hexdigest()

    d.save_data(data)
    d.post_file()
Example #9
0
def get_regulation_data():
    """Get regulation data from Firestore."""
    try:
        return get_data(REF, datafile=f'.datasets/{FILENAME}')
    except FileNotFoundError:
        return get_data(REF, datafile=f'../../.datasets/{FILENAME}')
Example #10
0
def get_analysis_data():
    """Get analysis data from Firestore."""
    try:
        return get_data(REF, datafile=f'.datasets/{FILENAME}')
    except FileNotFoundError:
        return get_data(REF, datafile=f'../../.datasets/{FILENAME}')
Example #11
0
def get_sponsorship_data():
    """Get sponsorship data from Firestore."""
    try:
        return get_data(REF, datafile=f'.datasets/{FILENAME}')
    except FileNotFoundError:
        return get_data(REF, datafile=f'../../.datasets/{FILENAME}')
Example #12
0
def index():
    download_data()
    return render_template("index.html", data=get_data())
Example #13
0
def map_view():
    download_data()
    return render_template("map.html", data=get_data())