Created
January 12, 2013 02:09
-
-
Save consindo/4515683 to your computer and use it in GitHub Desktop.
Nitro todo.txt generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
textfile = "" | |
pro = true | |
if pro | |
tasks = Task.sort(Task.list("all")) | |
# Avoids Logic | |
priorityArray = ["", "(A) ", "(B) ", "(C) "] | |
i = 0 | |
while i < tasks.length | |
textfile += priorityArray[tasks[i].priority] | |
textfile += tasks[i].name | |
textfile += " due:" + new Date(tasks[i].date).toISOString().substr(0, 10) unless tasks[i].date is "" | |
textfile += " +" + List.find(tasks[i].list).name + "\n" | |
i++ | |
else | |
textfile = "You'll need a Nitro Pro Account to generate todo.txt\nLearn more at <http://nitrotasks.com>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment