Remove Heroku support

master
Andrew Williams 2015-09-05 15:56:30 +01:00
parent 5baa671d83
commit 2564f972d8
3 changed files with 9 additions and 65 deletions

View File

@ -37,18 +37,4 @@ Running NextAction
NextAction will read your environment to retrieve your Todoist API key, so to run on a Linux/Mac OSX you can use the following commandline
TODOIST_API_KEY="XYZ" python nextaction.py
Heroku Support
--------------
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
This package is ready to be pushed to a Heroku instance with minimal configuration values:
* ```TODOIST_API_KEY``` - Your Todoist API Key
* ```TODOIST_NEXT_ACTION_LABEL``` - The label to use in Todoist for next actions (defaults to next_action)
* ```TODOIST_SYNC_DELAY``` - The number of seconds to wait between syncs. (defaults to 5)
* ```TODOIST_INBOX_HANDLING``` - What method to use for the Inbox, sequence or parallel (defaults to parallel)
* ```TODODIST_PARALLEL_SUFFIX``` - What sequence of characters to use to identify parallel processed projects (defaults to =)
* ```TODODIST_SERIAL_SUFFIX``` - What sequence of characters to use to identify serial processed projects (defaults to -)
python nextaction.py -a <API Key>

View File

@ -1,37 +0,0 @@
{
"name": "NextAction",
"description": "Todoist API application to provide a auto-populated next action label",
"repository": "https://github.com/nikdoof/NextAction",
"keywords": ["python"],
"env": {
"TODOIST_API_KEY": {
"description": "Your Todoist API Key",
"required": true
},
"TODOIST_NEXT_ACTION_LABEL": {
"description": "The Todoist label to use for next actions.",
"value": "next_action",
"required": false
},
"TODOIST_SYNC_DELAY": {
"description": "The number of seconds to wait between syncs.",
"value": "5",
"required": false
},
"TODOIST_INBOX_HANDLING": {
"description": "What method to use for the Inbox, sequence or parallel",
"value": "parallel",
"required": false
},
"TODODIST_PARALLEL_SUFFIX": {
"description": "What sequence of characters to use to identify parallel processed projects",
"value": "=",
"required": false
},
"TODODIST_SERIAL_SUFFIX": {
"description": "What sequence of characters to use to identify serial processed projects",
"value": "-",
"required": false
}
}
}

View File

@ -2,7 +2,6 @@
import time
import logging
import os
import sys
import argparse
from datetime import datetime
@ -34,24 +33,20 @@ def get_subitems(items, parent_item=None):
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-a', '--api_key', help='Todoist API Key',
default=os.environ.get('TODOIST_API_KEY', None))
parser.add_argument('-l', '--label', help='The next action label to use',
default=os.environ.get('TODOIST_NEXT_ACTION_LABEL', 'next_action'))
parser.add_argument('-d', '--delay', help='Specify the delay in seconds between syncs',
default=int(os.environ.get('TODOIST_SYNC_DELAY', '5')), type=int)
parser.add_argument('-a', '--api_key', help='Todoist API Key')
parser.add_argument('-l', '--label', help='The next action label to use', default='next_action')
parser.add_argument('-d', '--delay', help='Specify the delay in seconds between syncs', default=5, type=int)
parser.add_argument('--debug', help='Enable debugging', action='store_true')
parser.add_argument('--inbox', help='The method the Inbox project should be processed',
default=os.environ.get('TODOIST_INBOX_HANDLING', 'parallel'),
choices=['parallel', 'serial'])
parser.add_argument('--parallel_suffix', default=os.environ.get('TODOIST_PARALLEL_SUFFIX', '='))
parser.add_argument('--serial_suffix', default=os.environ.get('TODOIST_SERIAL_SUFFIX', '-'))
default='parallel', choices=['parallel', 'serial'])
parser.add_argument('--parallel_suffix', default='=')
parser.add_argument('--serial_suffix', default='-')
parser.add_argument('--hide_future', help='Hide future dated next actions until the specified number of days',
default=int(os.environ.get('TODOIST_HIDE_FUTURE', '7')), type=int)
default=7, type=int)
args = parser.parse_args()
# Set debug
if args.debug or os.environ.get('TODOIST_DEBUG', None):
if args.debug:
log_level = logging.DEBUG
else:
log_level = logging.INFO