diff --git a/dataset.json b/dataset.json index c83a556..0164533 100644 --- a/dataset.json +++ b/dataset.json @@ -1,21 +1,20 @@ - - { - "titles" : [ - "ranting about jira", - "siting in a meeting", - "squashing bugs", - "centering divs", - "waiting for staging deployment", - "writing tests", - "pushing directly to prod", - "doing code review", - "deleting jira tickets", - "Creating a pull request", - "forgot to run DB migrations", - "Broke production", - "running on staging ENV", - "merging git branches", - "releasing the MVP", "finding JIRA tickets" - ] + "titles": [ + "ranting about jira", + "siting in a meeting", + "squashing bugs", + "centering divs", + "waiting for staging deployment", + "writing tests", + "pushing directly to prod", + "doing code review", + "deleting jira tickets", + "Creating a pull request", + "forgot to run DB migrations", + "Broke production", + "running on staging ENV", + "merging git branches", + "releasing the MVP", + "finding JIRA tickets" + ] } \ No newline at end of file diff --git a/main.py b/main.py index c8c66ec..9b04b1b 100644 --- a/main.py +++ b/main.py @@ -4,21 +4,18 @@ import random import time import json -with open('dataset.json', 'r') as f: - data = json.load(f) - -titles = data['titles'] - client_id = os.environ["REDDIT_CLIENT_ID"] client_secret = os.environ["REDDIT_CLIENT_SECRET"] reddit_pass = os.environ["REDDIT_PASSWORD"] - def get_titles(): + with open('dataset.json', 'r') as f: + data = json.load(f) + + titles = data['titles'] currentlyViewingText, subscribersText = random.sample(titles, 2) return [currentlyViewingText, subscribersText] - def update_titles(): reddit = praw.Reddit( client_id=client_id,