Permalink
Browse files

release of v2

  • Loading branch information...
1 parent cbdb751 commit 90c39ce953b20186b5b557e4de60d135c6b79327 @bevesce committed Mar 2, 2013
Showing with 3,553 additions and 1,094 deletions.
  1. BIN F4D3CB4F-0E89-44D1-A5EA-A3A11021873D.png
  2. +35 −0 Ipsum.todo
  3. +9 −0 LICENSE
  4. +286 −7 README.md
  5. +0 −3 SublimeTodoFlow/Default (Linux).sublime-keymap
  6. +0 −3 SublimeTodoFlow/Default (Windows).sublime-keymap
  7. +0 −146 SublimeTodoFlow/TodoFlow.py
  8. BIN SublimeTodoFlow/TodoFlow.tmLanguage.cache
  9. +2 −0 __init__.py
  10. +0 −43 alfredlist.py
  11. +42 −0 config.py
  12. +0 −142 filterpredicate_test.py
  13. +0 −269 html/qqtest.html
  14. +0 −23 html/temp.html
  15. BIN icon.png
  16. BIN iconI.png
  17. BIN iconP.png
  18. BIN iconT.png
  19. BIN icons/add.png
  20. BIN icons/addw.png
  21. BIN icons/done.png
  22. BIN icons/donew.png
  23. BIN icons/iconT.png
  24. BIN icons/iconTw.png
  25. BIN icons/inbox.png
  26. BIN icons/inboxw.png
  27. BIN icons/note.png
  28. BIN icons/notew.png
  29. BIN icons/project.png
  30. BIN icons/projectw.png
  31. BIN icons/remove.png
  32. BIN icons/removew.png
  33. BIN icons/task.png
  34. BIN icons/taskw.png
  35. 0 src/__init__.py
  36. +64 −0 src/alfredlist.py
  37. 0 { → src}/colors.py
  38. +76 −0 src/fileslist.py
  39. +46 −37 { → src}/filterpredicate.py
  40. +115 −0 src/main.py
  41. +378 −295 { → src}/todolist.py
  42. +1 −1 { → src}/todolist_lexer.py
  43. +3 −2 { → src}/todolist_parser.py
  44. +136 −0 src/todolist_utils.py
  45. 0 tests/__init__.py
  46. +57 −0 tests/in/big.todo
  47. 0 tests/in/empty.todo
  48. +1 −0 tests/in/one_task.todo
  49. +57 −0 tests/min/big.todo
  50. 0 tests/min/empty.todo
  51. +1 −0 tests/min/one_task.todo
  52. +6 −0 tests/mout/ProjectB.todo
  53. +58 −0 tests/mout/add_abc.todo
  54. +4 −0 tests/mout/due-and-not-done.todo
  55. +6 −0 tests/mout/due.todo
  56. +26 −0 tests/mout/index0.todo
  57. +10 −0 tests/mout/index2.todo
  58. +19 −0 tests/mout/level0.todo
  59. +55 −0 tests/mout/level12.todo
  60. +5 −0 tests/mout/level2up.todo
  61. +12 −0 tests/mout/misc1.todo
  62. +13 −0 tests/mout/misc2.todo
  63. +2 −0 tests/mout/next_and_done.todo
  64. +36 −0 tests/mout/notA.todo
  65. +52 −0 tests/mout/notD.todo
  66. +20 −0 tests/mout/only-notes.todo
  67. +10 −0 tests/mout/only-projects.todo
  68. +37 −0 tests/mout/only-tasks.todo
  69. +22 −0 tests/mout/parentA.todo
  70. +42 −0 tests/mout/project-project.todo
  71. +12 −0 tests/mout/projectA.todo
  72. +54 −0 tests/mout/removeC.todo
  73. +19 −0 tests/mout/task1+d.todo
  74. +12 −0 tests/out/ProjectA.todo
  75. +6 −0 tests/out/ProjectB.todo
  76. +58 −0 tests/out/add_abc.todo
  77. +4 −0 tests/out/due-and-not-done.todo
  78. +6 −0 tests/out/due.todo
  79. 0 tests/out/index.todo
  80. +26 −0 tests/out/index0.todo
  81. +10 −0 tests/out/index2.todo
  82. +19 −0 tests/out/level0.todo
  83. +55 −0 tests/out/level12.todo
  84. 0 tests/out/level123.todo
  85. +5 −0 tests/out/level2up.todo
  86. +6 −0 tests/out/line_contains.todo
  87. +6 −0 tests/out/line_contins.todo
  88. +12 −0 tests/out/misc1.todo
  89. +13 −0 tests/out/misc2.todo
  90. +2 −0 tests/out/next_and_done.todo
  91. +36 −0 tests/out/notA.todo
  92. +52 −0 tests/out/notD.todo
  93. +20 −0 tests/out/only-notes.todo
  94. +10 −0 tests/out/only-projects.todo
  95. +37 −0 tests/out/only-tasks.todo
  96. +22 −0 tests/out/parentA.todo
  97. +42 −0 tests/out/project-project.todo
  98. +54 −0 tests/out/removeC.todo
  99. +19 −0 tests/out/task1+d.todo
  100. +201 −0 tests/test.py
  101. +0 −36 todolist_test.py
  102. BIN utilities/Inbox.alfredworkflow
  103. +22 −0 utilities/SublimeTodoFlow/Default (Linux).sublime-keymap
  104. +0 −1 { → utilities}/SublimeTodoFlow/Default (OSX).sublime-keymap
  105. +22 −0 utilities/SublimeTodoFlow/Default (Windows).sublime-keymap
  106. +37 −0 utilities/SublimeTodoFlow/README.md
  107. +3 −7 { → utilities}/SublimeTodoFlow/TodoFlow.JSON-tmLanguage
  108. +159 −0 utilities/SublimeTodoFlow/TodoFlow.py
  109. +10 −0 utilities/SublimeTodoFlow/TodoFlow.sublime-settings
  110. +4 −15 { → utilities}/SublimeTodoFlow/TodoFlow.tmLanguage
  111. BIN utilities/TodoFlow2.alfredworkflow
  112. +26 −0 utilities/archive.py
  113. +70 −0 utilities/config.py
  114. +18 −0 utilities/count_inbox.py
  115. +24 −0 utilities/end_the_day.py
  116. +21 −26 {html → utilities/html/css}/checkboxes.css
  117. +27 −24 {html → utilities/html/css}/index_card.css
  118. +15 −14 html/wider_card.css → utilities/html/css/wide_card.css
  119. +186 −0 utilities/html/temp.html
  120. +16 −0 utilities/inbox.py
  121. +44 −0 utilities/log_to_day_one.py
  122. +24 −0 utilities/mail-to-inbox.applescript
  123. +52 −0 utilities/open_html.py
  124. +13 −0 utilities/print_deadlines.py
  125. +12 −0 utilities/print_next.py
  126. +11 −0 utilities/print_today.py
  127. +1 −0 utilities/should_print
  128. +9 −0 utilities/switch_should_print.py
  129. +77 −0 utilities/tp
  130. +58 −0 utilities/tvcal.py
  131. +30 −0 utilities/update_lists.py
Deleted file not rendered
View
@@ -0,0 +1,35 @@
+Lorem ipsum dolor sit amet:
+ - consectetur adipisicing elit @done(2013-03-01)
+ - sed do eiusmod @today @othertag
+ - tempor incididunt ut labore et dolore @today
+ - magna aliqua. @today @sometag
+Ut enim ad minim veniam:
+ - quis nostrud exercitation @due(2013-03-01) @next
+ - ullamco laboris nisi ut aliquip ex ea commodo consequat. @next
+ Duis aute irure dolor in reprehenderit: @due(2013-03-13)
+ - in voluptate velit esse @onmac
+ - cillum dolore eu fugiat nulla pariatur. @someothertag
+ Excepteur sint occaecat cupidatat non proident:
+ - sunt in @person(Gall Anonim)
+ culpa qui
+ officia
+ - deserunt mollit anim id est laborum. @done(2013-03-01)
+At vero eos et accusamus et iusto:
+ - odio dignissimos ducimus, @done(2013-03-01)
+ - qui blanditiis praesentium @next @person(Lorem Ipsum)
+ - voluptatum deleniti atque corrupti, @next
+ - quos dolores et quas molestias excepturi sint, @next
+ - obcaecati cupiditate non provident, @next
+ - similique sunt in culpa, @next
+ - qui officia deserunt mollitia animi, @next
+ - id est laborum et dolorum fuga. @next
+ Et harum quidem rerum facilis est et expedita distinctio:
+ Nam libero tempore, cum soluta nobis est eligendi optio, @onphone
+ cumque nihil impedit, quo minus id, quod maxime placeat, @whatever
+ - facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
+ Temporibus autem quibusdam et aut officiis:
+ debitis aut rerum necessitatibus saepe eveniet,: @someday
+ ut et voluptates repudiandae sint et molestiae non recusandae.
+ Itaque earum rerum hic tenetur a sapiente delectus: @done(2013-03-01)
+ - ut aut reiciendis voluptatibus maiores @done(2013-03-01)
+ - alias consequatur aut perferendis doloribus asperiores repellat. @done(2013-03-01)
View
@@ -0,0 +1,9 @@
+Copyright (C) 2013 Piotr Wilczyński
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, or publish subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+BACKUP YOURS TODO LISTS!
View
293 README.md
@@ -1,10 +1,289 @@
-# Work in progress...
+# Topy / TodoFlow #
-Upcoming major changes:
+# Overview #
-* much more than alfred workflow
-* more complex searching syntax
-* converting lists to colored text, html, markdown (css included)
-* more editing options
-* shift of paradigm - work with one list, at least for now
+Topy module provides API for interacting with todo lists in plain text files with [taskpaperlike][] format with powerful [query syntax][query]. It provides functions to modify lists and to convert them to markdown, html and XML used in [Alfred2][] workflow. See [utilities][] for examples of what can be done with it.
+
+You can jump straight to Alfred2 [workflow]s if you here for that.
+
+# Usage #
+
+##### topy #####
+
+Use *from_file* and *from_files** functions to create object that represents todo list. Module also provides functions for basic modifications of list using items id (*do*, *tag*, *remove*, *get_content*, *add_new_subtask*).
+
+\* when creating one list from multiple files each list is packed into project with title identical to name of source file.
+
+##### topy.lists [active lists] #####
+
+Provides functions to add, remove and retrieve globally available list of path to active todo lists. Those paths are stored in tab-separated text file, its location can be specified in config.py.
+
+##### topy.todolist #####
+
+Defines classes TodoList, Note, Project, Task and operations on them.
+
+For more read comments in source files.
+
+## List Syntax ##
+
+- Task is line that begins with '- ', can be indented with tabs.
+- Project is every line that is not task and ends with ':' with eventual trailings tags after that colon.
+- Every other line is a note.
+- Tag is word preceded by '@' with eventual parameter in parenthesis (e.g. **@today**, **@done(2013-03-01)**).
+- Structure of list is defined by indentation levels of items.
+
+## Query Syntax [query] ##
+
+You can filter items in the list by searching for the words, tags (e.g. **@today**) or using argument-operator-value syntax.
+
+##### Arguments:
+
+- project - title of any parent project in hierarchy
+- uniqueid
+- content - line without formatting and trailing tags
+- type - task / note / "project"
+- level - indentation level
+- parent - any parent in hierarchy
+- index - index in list, relative to closest parent, starts with 0. For example:
+
+ Parent project:
+ - task1
+ subproject:
+ - task2
+ - task3
+ - task4
+
+Both task1 and task2 have index 0, subproject and task3 have index 1, task4 has index 2.
+
+- tag - parameter of tag
+
+##### Operators:
+
+- =
+- !=
+- \< - values are compared lexicographically (it just string comparision)
+- \>
+- \<=
+- \>=
+- matches - match with regexp
+- contains, $ (those are synonyms)
+
+Two queries joined by *and* are query, two queries joined by *or* are query, query can be negated with *not* operator. Words that are part of syntax can be escaped by putting them in double quotes "".
+
+Full grammar is in filterpredicate.py source file.
+
+# Instalation & Configuration #
+
+For now I'm not providing *setup.py*, so to use it from anywhere you need to add directory that contains topy folder to python path. Main configuration file is in *topy/config.py*, options are described there. Several [utilities][] require additional configuration.
+
+# Utilities #
+
+Some examples what can be done with this module and other tools for working with plain text todo lists. Those are scripts I use on daily basis with my todo list (Projects.todo, Onhold.todo and Inbox.todo).
+
+## tp ##
+
+ Command line interface.
+
+ usage: tp [-h] [-q QUERY] [-p [PATHS [PATHS ...]]] [--not-colored]
+ [--markdown] [--with-ids] [--html] [--css CSS] [--countdow ]
+ [--dont-indent
+
+ Filter todo list.
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -q QUERY, --query QUERY
+ predicate to filter with
+ -p [PATHS [PATHS ...]], --paths [PATHS [PATHS ...]]
+ paths to files containg todo list, defaults to paths
+ stored in topy.lists (see config.py)
+ --not- colored, -nc not colored output
+ --mark down, -md print as markdow
+ --with -ids, -ids print with items ids
+ --html print as htm
+ --css CSS css stylesheet, only valid with --html
+ --countdown, -cd print as countdown
+ --dont-indent don't indent lines
+
+![tp_screen_shot][]
+
+## SublimeTodoFlow ##
+
+SublimeText 2 package, read more in [its readme][SublimeReadme].
+
+## TodoFlow2 Alfred 2 Workflow [workflow] ##
+
+*Requires additional configuration of paths in config.py inside workflow folder*
+
+##### *q* keyword
+
+Displays all tasks in [active lists][], you can filter them by typing [query][].
+
+- ↩ - tags task as **@done**
+- ⌘+↩ - copies task without trailing tags to clipboard
+- fn+↩ - removes task from list
+
+![alfred-q][]
+
+In config.py you can set dictionary of one-letter abbreviations for queries. To use them type **q** and then previously defined abbreviation (without space). Abbreviations can be chained with *and*.
+
+Examples:
+
+ quick_query_abbreviations = {
+ 'n': '@next',
+ 'd': 'not @done',
+ }
+
+- **qn** - search for tasks tagged with **@next**
+- **qd** - search for tasks *not* tagged with **@done**
+- **qnd** - search for tasks tagged with **@next** *and not* tagged with **@done**
+
+
+##### *a* keyword #####
+
+
+Displays list of all projects in [active lists][].
+Type task and hit ↩ to append task to selected project, you can filter projects by typing [query][] after ';'.
+
+![alfred-a][]
+
+##### *remove list* keywords #####
+
+- ↩ - remove list from [active lists][]
+
+##### *add list* file action #####
+
+Adds list to [active lists][]
+
+##### icons #####
+
+- ![task][] - task
+- ![done][] - item tagged as **@done**
+- ![project][] - project
+- ![note][] - note
+
+## Inbox Alfred 2 Workflow ##
+
+*Requires additional configuration of paths in inbox.py inside workflow folder*
+
+##### *in* keyword & fallback search ######
+
+Appends typed task with date stamp to Inbox.todo.
+
+![alfred-in][]
+
+##### first hotkey #####
+
+Appends selected text to Inbox.todo with date stamp.
+
+##### second hotkey #####
+
+Appends selected mails in Mail.app to Inbox.todo, see [mail-to-inbox][]
+
+
+---
+
+*You can configure following scripts in **utilities/config.py**. That includes path to todo lists, what is very important.*
+
+---
+
+### open_html
+
+ usage: open_html.py [-h] [-q QUERY] [-p [PATHS [PATHS ...]]] [--css CSS]
+
+ Open page with todo list in default browser.
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -q QUERY, --query QUERY
+ predicate to filter with
+ -p [PATHS [PATHS ...]], --paths [PATHS [PATHS ...]]
+ paths to files containg todo list, defaults to paths
+ stored in topy.lists (see config.py)
+ --css CSS css stylesheet, only valid with --html
+
+3 css styles are included.
+
+### archive ###
+
+Moves **@done** tasks from active todo lists to Archive.todo.
+
+### inbox ###
+
+Appends tasks to Inbox.todo with date stamp as parameter of **@in** tag.
+
+### mail-to-inbox ###
+
+AppleScript that's puts selected tasks in Mail.app to Inbox.todo in following format:
+
+\- subject **@in(**date received**)** **@person(**sender**)** **@mail(**message://...**)**
+
+Requires additional configuration in script itself. I know nothing about AppleScript so it may be not very pretty.
+
+### log_to_day_one ###
+
+Creates entry in [Day One][] with tasks that were done today.
+
+### tvcal ###
+
+Adds titles of tv series that will air in upcoming 24 hours to Inbox.todo, requires account at <http://www.pogdesign.co.uk/cat/>
+
+### update_lists ###
+
+Provides functions to update recurring tasks.
+
+* Tasks in Onhold.todo with tag **@waiting(some-date-in-ISO-8601-format)** are added to Inbox.todo at that date.
+* Tasks in Onhold.todo tagged with **@weekly(some-day-of-the-week)** are added to Inbox.todo at that day.
+* Tag **@done** is removed from tasks in Daily project in main todo list.
+
+At the moment no tasks are removed from Onhold.todo.
+
+### end_the_day
+
+Joins several of other scripts. Launchd runs it for me at the and of the day.
+
+## NerdTool / GeekTools ##
+
+Scripts I use to put todo lists on Desktop with Nerdtools.
+
+### NerdTool Exported Logs ###
+
+It looks like this:
+
+![nerd_tools][]
+
+### print_next ###
+
+Prints actionable tasks.
+
+### print_today ###
+
+Prints tasks planned for today.
+
+### print_deadlines
+
+Prints tasks that have due date with count of days that left to that date.
+
+### count_inbox ###
+
+Prints out number of items in Inbox.todo.
+
+
+© 2013 Piotr Wilczyński
+[@bevesce][]
+
+[taskpaperlike]: http://www.hogbaysoftware.com/products/taskpaper
+[SublimeReadme]: https://github.com/bevesce
+[Day One]: http://dayoneapp.com
+[tp_screen_shot]: http://bvsc.nazwa.pl/img/TodoFlow/tp.png "tp iTerm screenshot"
+[nerd_tools]: http://bvsc.nazwa.pl/img/TodoFlow/nerdtool.png "NerdTool screenshot"
+[Alfred2]: http://v2.alfredapp.com
+[alfred-a]: http://bvsc.nazwa.pl/img/TodoFlow/TodoFlow2-a.png
+[alfred-q]: http://bvsc.nazwa.pl/img/TodoFlow/TodoFlow2-q.png
+[alfred-in]: http://bvsc.nazwa.pl/img/TodoFlow/TodoFlow2-in.png
+[@bevesce]: https://twitter.com/@bevesce
+[done]: http://bvsc.nazwa.pl/img/TodoFlow/done.png
+[task]: http://bvsc.nazwa.pl/img/TodoFlow/task.png
+[project]: http://bvsc.nazwa.pl/img/TodoFlow/project.png
+[note]: http://bvsc.nazwa.pl/img/TodoFlow/note.png
@@ -1,3 +0,0 @@
-[
- { "keys": ["ctrl+shift+alt+enter"], "command": "task"}
-]
@@ -1,3 +0,0 @@
-[
- { "keys": ["ctrl+shift+alt+enter"], "command": "task"}
-]
Oops, something went wrong.

0 comments on commit 90c39ce

Please sign in to comment.