Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to python3 #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions 1on1_add_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ def get_user_selected_group(groups):
"""Promppt user to select project group."""

for i, group in enumerate(groups):
print i, ': ' + group
print i + 1, ': all'
print i + 2, ': choose'
print( i, ': ' + group)
print (i + 1, ': all')
print (i + 2, ': choose')

return raw_input('Select (name) which projects or groups to add task to: ')
return input('Select (name) which projects or groups to add task to: ')


def get_user_task_title():
"Prompt user for task title, and return result."

return raw_input("Enter task title: ")
return input("Enter task title: ")

def get_user_task_description():
"""Prompt user for task description. return as a string."""
Expand All @@ -36,7 +36,7 @@ def get_user_task_description():
contents = []
while True:
try:
line = raw_input("")
line = input("")
except EOFError:
break
contents.append(line)
Expand All @@ -52,7 +52,7 @@ def get_projects_by_user_select(projects):

selected_projects = []
for project in projects:
add_to_project = raw_input('Add to ' + project['name'] + ' [y/n]? ')
add_to_project = input('Add to ' + project['name'] + ' [y/n]? ')
if(add_to_project == 'y'):
selected_projects.append(project)
return selected_projects
Expand Down Expand Up @@ -113,11 +113,11 @@ def get_assignee(assign_pref, project):
user_selected_projects = get_user_selected_projects(projects)
task_name = get_user_task_title()
task_notes = get_user_task_description()
assignee_type = raw_input('Choose Task Assignee (me/them/none): ')
assignee_type = input('Choose Task Assignee (me/them/none): ')

print
print()
print("Creating tasks...")
print
print()
print("Adding to " + str(len(user_selected_projects)) + " projects.")

for project in user_selected_projects:
Expand All @@ -138,9 +138,9 @@ def get_assignee(assign_pref, project):
if not args.dry_run:
result = client.tasks.create(task)
print(' ' + result['projects'][0]['name'] + '-> Done!')
print
print()
else:
print(' ' + project['name'] + '-> Dry Run!')
print
print()