Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Jan 24, 2012
  1. @ginatrapani

    Merge pull request #72 from inkarkat/list-optimization2

    ginatrapani authored
    Optimization: Put grep -v empty task filter inside sed.
  2. @ginatrapani

    Merge pull request #71 from inkarkat/deduplicate-and-report

    ginatrapani authored
    Deduplicate and report
Commits on Jan 23, 2012
  1. @inkarkat

    Optimization: Put grep -v empty task filter inside sed.

    inkarkat authored
    No need to spawn off another process for this; we can do this inside the sed command that joins the task numbers with the task text.
    
    Note: The sed on OS X does not understand the \+ bound, only in the form of + when used with -E. Instead, I chose to fall back to the \{1,\} basic regexp, in the hope that it is very portable, and to avoid introducing extended regexps to the script.
  2. @inkarkat

    FIX: Adapt deduplicate sed command for OS X.

    inkarkat authored
    The sed command of BSD / OS X doesn't like { command } blocks in a single expression. So move the (dynamic) deduplicate sed command(s) to the end, and use a label to access them. This also makes the entire sed script somewhat easier to understand.
Commits on Jan 21, 2012
  1. @inkarkat
  2. @inkarkat

    ENH: Only add new data to report.

    inkarkat authored
    When the last reported values are identical to the current values, do not append the same information (just with a new timestamp) to the report. Instead, just print the last report line.
    
    With this, the report action can be scheduled periodically (e.g. via cron) without artificially inflating the report file.
  3. @inkarkat

    Align report order with other actions.

    inkarkat authored
    Like "add" or "do", first the object, then (in verbose mode) the status message is printed.
  4. @inkarkat

    Use ISO 8601 timestamp format.

    inkarkat authored
    IMO 2012-01-14T14:49 looks better than the messy -*-*-*- of 2012-01-14-14:49, and is more aligned with standards.
  5. @inkarkat
  6. @inkarkat

    Only print the added report line, not entire report.

    inkarkat authored
    I think this makes much more sense, especially once the report gets very long. (One can always use "cat" to view the entire report.)
  7. @inkarkat

    Remove inactive broken report header.

    inkarkat authored
    This was meant to write a report header on the initial report run, but as it mistakenly used TODO_FILE instead of REPORT_FILE, it was inactive, and also missing in the tests. Let's just remove it; the format is simple, anyway.
  8. @inkarkat

    Pull archive() in-line and delegate via recursive call, also for report.

    inkarkat authored
    The report action should delegate to archive; it previously (half) did this via duplicated code (and forgot to defragment empty lines, so the tally could be off, and kept silent about the archiving).
    
    The do action directly invoked archive(); if the user had extended / modified the archive action via an eponymous custom action, it would not run. Therefore, always invoke archive through another call of todo.sh, so that a possible custom action is considered.
  9. @inkarkat
  10. @inkarkat
  11. @inkarkat

    Rework fixed archive deduplication into new deduplicate action.

    inkarkat authored
    As per discussion on the mailing list (http://tech.groups.yahoo.com/group/todotxt/message/3775), the automatic deduplication during archiving is unexpected and difficult to enforce in other implementations. Rather, make this a separate (optional) action.
  12. @paulroub @inkarkat

    explained the sed duplicate-removal pattern

    paulroub authored inkarkat committed
  13. @paulroub @inkarkat
Commits on Jan 20, 2012
  1. @jean @ginatrapani

    Various helptext fixes

    jean authored ginatrapani committed
    * 'Quotes optional.' doesn't make sense for 'addm', because without quotes, 'addm' is 'add'.
    * There are no projects that don't start with a +.
    * Don't tell people to type uppercase when the software takes care of it.
    * Mention actions, mention filtering *out* terms.
    * Fix link to wiki in the README
    Closes #60
  2. @inkarkat @ginatrapani

    Strip trailing whitespace when completing tasks.

    inkarkat authored ginatrapani committed
  3. @inkarkat @ginatrapani

    Remove task date(s) when completing prioritized and done tasks.

    inkarkat authored ginatrapani committed
    Replace the primitive substitutions inside the completion function with a call to sed (instead of calling head), and supply more powerful substitutions there.
  4. @inkarkat @ginatrapani

    Avoid external TR when replacing , with space.

    inkarkat authored ginatrapani committed
    No need for an external tool, Bash can do a global literal substitution itself.
  5. @inkarkat @ginatrapani

    Add HIDE_CUSTOM_SUBSTITUTION for customization and add-ons.

    inkarkat authored ginatrapani committed
    Add-ons or users may want to hide parts of the task text from the output.
    Though this can already be solved through TODOTXT_FINAL_FILTER, augmenting the configured value is not trivial, and it introduces another SED command into the already long _list() pipeline. Putting an additional HIDE_CUSTOM_SUBSTITUTION into the existing pipeline has hardly any performance implications, and makes the realization of this use case trivial.
  6. @inkarkat @ginatrapani

    BUG: SED error when HIDE_..._SUBSTITUTION contains whitespace.

    inkarkat authored ginatrapani committed
    This error only occurs when add-ons override either HIDE_PROJECTS_SUBSTITUTION or HIDE_CONTEXTS_SUBSTITUTION with a pattern that contains whitespace, not with the values used within todo.sh. But correcting the sloppy quoting doesn't hurt, neither.
  7. @inkarkat @ginatrapani

    Add hint for OR'ing TERMs to help text for ls/list.

    inkarkat authored ginatrapani committed
    The regexp syntax and quoting rules aren't known to many who are not well versed in the Bash shell, and difficult to get right even for people in the know. This question came up just recently on the mailing list, too.
  8. @inkarkat @ginatrapani

    Cosmetics: Correct double-spacing in help text.

    inkarkat authored ginatrapani committed
  9. @inkarkat @ginatrapani

    Cosmetics: Consistently use "TERM(s)" in help text.

    inkarkat authored ginatrapani committed
    Two places only used "TERM" although multiple are supported. This can be misleading: do one or all have to match?
  10. @inkarkat @ginatrapani

    ENH: listall doesn't simply use concatenated task lists.

    inkarkat authored ginatrapani committed
    The simplistic "listall" action implementation just uses _list() on the concatenation of active and done task lists. This has the following shortcomings:
    
    - Task numbers shown for archived tasks from done.txt are invalid.
    - As the number of done tasks likely greatly outnumbers the number of active tasks, the task number padding is often larger than expected (e.g. 0005 instead of 05).
    - Verbose output lists all tasks as originating from TODO, whereas it should differentiate between TODO: and DONE: sources.
    
    The main challenge is to keep processing all tasks through a single pass of _list(), so that there is a single, unified sorting applied to all tasks. A custom AWK script sets all (originally invalid) task numbers from done.txt to "0", meaning "archived task".
    The verbose message from _list() is replaced with a custom message that shows the tasks from todo.txt, done.txt, and totals.
    
    Oh, and added tests for the previously untested "listall" action.
Commits on Dec 23, 2011
  1. @inkarkat

    Reformatting: Lay out _list() file numbering in multi-line.

    inkarkat authored
    ...like the following complex formatting and filtering steps.
Commits on Dec 19, 2011
  1. @ginatrapani

    Merge pull request #59 from inkarkat/bug-pri-no-existence-check

    ginatrapani authored
    BUG: pri doesn't issue an error when the task does not exist.
Commits on Dec 18, 2011
  1. @inkarkat

    Refactoring: Extract getPrefix() for more consistent move error.

    inkarkat authored
    I think that the error on the "move dest src" action should be given like "SRC: No task 42" instead of "TODO: No task 42 in /path/to/src.txt", to be consistent with the addto and listfile actions. Extracted and exposed getPrefix(), again to remove a bit of duplication, and because this can be useful in custom add-ons, too.
Commits on Dec 17, 2011
  1. @inkarkat

    Refactoring: Extract getTodo() and getNewtodo() functions.

    inkarkat authored
    The retrieval of a task text for $item and associated error handling so far was scattered around the individual actions. This is now consolidated in two new utility functions, which directly set $todo or $newtodo, respectively. (Inconsistent variable names like $NEWTODO have been adapted.) This ensures that all actions perform the same error checking, reduces a bit of duplication, and allows custom add-ons to benefit from these exported functions. Ah, and the error messages for the "move" action is now more in line with the other errors; unfortunately, this isn't yet covered by a test.
    
    Note that the check whether $item is numeric must not use the +([0-9]) extglob any more, as such functions cannot be exported; a new Bash doesn't have the "shopt -s extglob" and complains with a syntax error. Fortunately, it is possible to perform the same check via standard Bash mechanisms.
  2. @inkarkat
Commits on Dec 7, 2011
  1. @ginatrapani

    Merge pull request #58 from inkarkat/bug-quoting-negative-term

    ginatrapani authored
    FIX: Correct quoting for negative -TERM filtering.
  2. @ginatrapani

    Merge pull request #57 from inkarkat/filename-completion

    ginatrapani authored
    Add file completion for addto, listfile, and move.
  3. @ginatrapani

    Merge pull request #56 from inkarkat/todo_completion

    ginatrapani authored
    Incorporate Bash completion from the Wiki page into the distribution.
Something went wrong with that request. Please try again.