Esempio n. 1
0
#Here's where I'm putting my login stuff for Todoist.
tod_user = main.tod_login('auth.cfg')
# todayFilter = tod_user.filters.add('todayFilter', 'today')
# tod_user.commit()

tod_user.sync()
tod_projects = tod_user.projects.all()
tod_inboxID = tod_projects[0].data['id']

#Telling the site where the config stuff for Habitica can go and get a list of habitica tasks...
auth = main.get_started('auth.cfg')

# import pdb
#Getting all complete and incomplete habitica dailies and todos
hab_tasks, r1 = main.get_all_habtasks(auth)

#Okay, now I need a list of todoist tasks. How do achieve that.
tod_tasks = []
tod_items = tod_user.items
tod_tasklist = tod_items.all()
today = datetime.now()
today_str = today.strftime("%Y-%m-%d")
# one_day = timedelta(days=1)
# yesterday = datetime.now() - one_day
# yesterday_str = yesterday.strftime("%Y-%m-%d")

# tod_tasklist = (list(filter(lambda x: x['due'] != None and x['checked'] == 0 and x['is_deleted'] == 0 and x['due'] != None and (x['due']['date'][:10] == today_str or x['due']['date'][:10] == yesterday_str), tod_tasklist)))
tod_tasklist = (list(
    filter(
        lambda x: x['due'] != None and x['checked'] == 0 and x['is_deleted'] ==
Esempio n. 2
0
import sys 
from time import sleep
from webbrowser import open_new_tab
from docopt import docopt
from pprint import pprint

#Here's where I'm putting my login stuff for Todoist.
tod_user = main.tod_login('auth.cfg')
tod_projects = tod_user.projects.all()
tod_inboxID = tod_projects[0].data['id']

#Telling the site where the config stuff for Habitica can go and get a list of habitica tasks...
auth, hbt = main.get_started('auth.cfg')  

#Getting all complete and incomplete habitica dailies and todos
hab_tasks, r1, r2 = main.get_all_habtasks(auth)

#Okay, now I need a list of todoist tasks. How do achieve that. 
tod_tasks = []
tod_items = tod_user.items
tod_tasklist = tod_items.all()
for i in range(0, len(tod_tasklist)):
    tod_tasks.append(TodTask(tod_tasklist[i].data))

"""
Okay, I want to write a little script that checks whether or not a task is there or not and, if not, ports it. 	
"""

pkl_file = open('habtod_matchDict.pkl','rb')
try: 
    matchDict = pickle.load(pkl_file)