todotxt / todo.txt-cli Goto Github PK
View Code? Open in Web Editor NEW☑️ A simple and extensible shell script for managing your todo.txt file.
Home Page: http://todotxt.org
License: GNU General Public License v3.0
☑️ A simple and extensible shell script for managing your todo.txt file.
Home Page: http://todotxt.org
License: GNU General Public License v3.0
I've got to be crazy but looking at this page on the wiki:
https://github.com/ginatrapani/todo.txt-cli/wiki/user-documentation
which is linked in a few places as describing how to install and use todo.cli, I can only find information about installing it, setting up bash completion, writings about why it's in plain text, where to find enhancements etc., but nowhere do I find basic todo.sh usage (I've never used it before).
I've got to simply be missing something but thought I'd file an issue just in case.
First of all thank you for this project.I have been using this program for a while. I have got some suggestion to improve this awesome project.
I have a invalid.txt
which stores invalid todo items.Currently i move items to this file by using todo.sh move
command. I use it frequently , so i would like to have a shortcut like todo.sh del ##
/ todo.sh d ##
I installed the Todo.txt CLI with Homebrew:
$ brew install todo-txt
I then attempted to create an event:
$ todo.sh add "Test"
Fatal Error: Cannot read configuration file /Users/Mike/.todo/config
I can fix the above error by creating a symbolic link to todo.cfg:
$ sudo ln -s /usr/local/Cellar/todo-txt/2.10/todo.cfg /Users/Mike/.todo/config
But, I assume that the symlink will be broken when Brew updates todo-txt. Is this the case?
Is it possible to have /Users/Mike/.todo/config
always point to todo.cfg
, even after Brew has updated the program?
Thank you.
" mv todo.cfg ~/."
The file that downloads is called todo.cfg but ...
when I ran todo.sh, it looked for /home/username/.todo/config
I had to create the .todo directory and rename todo.cfg to config
I'd be happy to make create a brew
formula, if you don't have a plan for it already. or would be to help in any way if you already have a plan.
I believe it would be great if it is possible to do:
t do 1,2,3
or
t do 1 2 3
I've noticed that $TODO_SH only contains the file name of the
script. Wouldn't it make sense for it to contain the full path (not
everyone has set up their PATH to include the todotxt directory)?
I have been thinking it would be great if I could be reminded of the things I had done for each day. For example, by receiving a daily digest email or a growl-like notification on a desktop.
I am curious if there's already a plugin that does a similar thing? If not, I would like to work on it so that it can integrate with services like idonethis.com?
Any pointers would be deeply appreciated.
Wouldn't it make sense to use Twitter's widespread hashtags for #contexts?
Also both Twitter and Facebook uses the @ symbol to denote a person or account. I feel that could definitely serve as a more intuitive character for project names.
$ t add test TODO: 'test' added on line 114. $ t pri 114 a 114: (A) test TODO: 114 prioritized (A). $ t prepend 114 Prepend: pretest 114: **pretest (A)** test
If by accident you repeat @todo.sh do@ twice on the same task, this should be ignored but instead we have:
$ t add test TODO: 'test' added on line 114. $ t do 114 114: x 2009-03-21 test TODO: 114 marked as done. $ t do 114 114: **x 2009-03-21 x 2009-03-21** test TODO: 114 marked as done.
There's a bug in sed expression on line 251 (in version 2.4 or commit a4227df -- that's what I checked) of todo.sh (function "archive").
I do:
todo.sh do 6
Output:
6: x 2009-08-05 2009-07-21 Rachunek za gaz +mieszkanie
TODO: 6 marked as done.
x 2009-08-05 2009-07-21 Rachunek za gaz +mieszkanie
sed: -e expression \#1, char 34: Invalid range end
TODO: /home/lavrin/docs/todo/todo.txt archived.
Todo item no. 6 is marked and properly copied to done.txt, but the original todo.txt is purged. However, todo.txt.bak is fine.
Unfortunately, I'm not able to post a patch, as about sed I know nothing except there's such tool ;)
Note: I am running Mac OS 10.7.4.
If you specify a new config path using the -d
option, the -h
flag is inaccessible due to a bug.
Typing ./todo.sh -h
will result in the error,
Fatal Error: Cannot read configuration file /Users/user/.todo/config
Typing ./todo.sh -h -d $HOME/CONFIG/PATH/HERE
will result in the same error (using the old path, not the newly specified one).
Typing ./todo.sh -d $HOME/CONFIG/PATH/HERE -h
will ignore the -h flag entirely, which is to be expected considering the usage text:
Usage: todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description]
Try 'todo.sh -h' for more information.
Also, I'm personally aliasing t
to todo.sh -d $HOME/CONFIG/PATH
so I would like it if -h
could be specified after the -d
flag and associated argument are specified.
According to the specifications of todo.txt format all context must be preceded with a space, but if you start a task with a context, does this rule apply to this? Or is @work call This Dude about+theAwesomeProject
a valid task?
The listcon command incorrectly identifies tokens that have an infix '@' rather than just a prefix '@'.
If I had a task "@work +bigjob Send status report to customer [email protected]", then when I run the listcon action, I'll see:
@fastcompany.com
@work
but it should have only listed @work.
Please do not enter feature requests or bug reports here until you have joined the mailing list and submitted it there for verification and discussion first.
http://tech.groups.yahoo.com/group/todotxt/
Then, include a link to the mailing list discussion once the issue has been verified as something that needs to be fixed/added to the core script (and not an add-on or otherwise). Thanks!
How can you quickly customize the list display so it shows something before the todo item, such as a [ ] or the like?
I know this is not the place to post this question, but after multiple attempts Yahoo won't let me join the mailing list, no clue why. anyway, question is: is there any documentation or articles on how to use todo.txt within a team project?
thanks
Although the addons support producing a short help line of text, they are not queried for their short help, and no addon short help is displayed.
When I run:
t ls "+park"
the output to screen looks fine but if I > file.txt OR if I pipe to mail the output is a little odd what are the artifacts at the begining and end of the file/email and how can I prevent that?
Example output:
^[[0;32m02 (B) update projects +park @scot @david^[[0m
TODO: 2 of 13 tasks shown
The documentation does not provide any help on activating auto-completion using a Zsh shell. Is there any way to enable it?
By default, make install will install all the files in /usr/local/bin.
Can you make it possible to specify an installation prefix other than /usr/local, in particular $HOME?
Thank you
@ginatrapani sorry didn't see your wish to you use the mailing list instead of the issue tracker.
Using the todo.txt-cli version 2.10 on Windows (under a Git Bash shell), both the help
command and the -h
flag add an empty task at the end of the todo.txt file.
Example:
$ tail -2 $TODO_FILE
2014-01-02 Test task 1
2014-01-02 Test task 2
$ t help
# (help output ommited)
$ tail -2 $TODO_FILE
2014-01-02 Test task #2
2014-01-02
An empty task with just today's date, 2014-01-02
is added at the end of the todo.txt file.
t -h
also adds an empty task.
I know this is rather a Windows/Git Bash issue, but I wonder if the same happens on Cygwin, and if there's something that can be done in the script to avoid this.
There's no v2.9
tag in your GitHub repository. Either you forgot to tag this, or just didn't git push --tags
. This makes it difficult to investigate in which version a feature was introduced.
I'm still trying to track down what the cause of the error is but I have a feeling it has something to do with locking.
Steps to reproduce:
1.Mount webDav from owncloud that has my todoCli folder.
2.todo ls (no problems I can see my tasks)
3.todo do pops an error:
sed: cannot rename /home/gr0undzer0/todoCLI/todo.txt: Input/output error
sed: cannot rename /home/gr0undzer0/todoCLI/todo.txt: Input/output error
I can create new files within this folder without issue. It's probably fair to say that todoCLI may not be causing this at all but I figure I'd see if anyone else had tried this and had any problems?
Thanks.
I've followed up the example and it was easy.This is my first time using GIT. Sorry I didn't knew where to edit the text.
Difficulties? well, I only had to manage the TODO_ACTIONS_DIR variable, which I set to "$TODO_DIR/todo.actions.d" in my todo.cfg. This was something quite obvious.
The thing is that I had to explicitly add the TODO_SH variable in my todo.cfg otherwise the custom add command wouldn't be able to call the built-in add command. I mean I was getting something like:
"$ t command add test
....todo.sh: add command not found"
Hope it helps to any other with same issue.
Currently todo.sh uses both ~/.todo.cfg
and ~/.todo.actions.d
.
As discussed, these could be combined into a single directory:
~/.todo/config
, ~/.todo/actions
plus ~/.todo/filters
.
The specs say that a completed task must have a completion date. This constraint looks unnecessary. There are good use cases for completed tasks without a date - for example, I use checklists a lot, and checklists doesn't need a completion date. Personally, I rarely even use completion dates in my regular todo lists - when a task is done, it's done, and I don't care about the details.
I'd like to edit my Todo.txt with a text editor quickly - adding an 'x' in front of a task should be enough to mark it as completed, and the resulting line should be valid. Writing dates is always a chore.
The spec would become: in a completed task, if you have a date after the x, that's the completion date. If you have two dates, then the first date is the completion date, and the second date is the creation date. This would read slightly more complicated than "you must have a completion date after the x, followed by an optional creation date" - but it would make the format more tolerant and the file easier to manage. It's also fully backwards-compatible.
Input file specified two times.
TODO: 0 of 19 tasks shown from /mnt/c/Users/limon/Documents/todo/todo.txt
It can be easily done via WebDAV (CalDAV) and the server https://pXX-caldav.icloud.com/DSID/calendars/
where XX
is a server number (internally called partition) and DSID
seems to be a unique identification number that is associated your Apple-ID. It can be found for example in some URLs on https://www.icloud.com
(e.g. of the profile picture). The reminders are stored in a resource collection. All entries are separately stored in .ics
format (using VTODO
) and need to have a GUID as name.
On NetBSD (and probably other BSDs) sed is not supporting the inline mode todo.txt is using (sed -i).
A quick workaround is to replace "sed" with "gsed" in todo.sh. Please either let the user define which sed version to use, e.g. in .todo/config or don't use sed's inline mode.
uname -a : Linux Phoenix 3.2.0-63-generic-pae #95-Ubuntu SMP Thu May 15 23:26:11 UTC 2014 i686 i686 i386 GNU/Linux
I keep getting:
Usage: todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description] Try 'todo.sh -h' for more information.
Whenever I try to use:
* * * * * /home/dave/bin/todo.sh -p | mail -s "Todo" [email protected]
If I don't use the -p the email is sent but it shows up as an attachment because of the ansi colors. Is there a way to turn off the colors in the config file itself? If there isn't why doesn't cronjob work?
The mail portion of the command works fine. I tested it with a "ls" command and with echo. There is something special about todo.sh in the cron environment.
I use todo.txt together with Simpletask on my Android phone. On Simpletask I can create hiddden tasks, e.g. to define all my common projects and contexts so that they are also available if there is no task assigned. That's really useful because it allows you to always auto-complete projects and contexts, even if you just create the first task for it. Simpletask defines this hidden tasks by adding "h:1" to the task description. Is it possible to also hide this tasks from todo.txt-cli?
I would be also willing to write my own extension for it, if you give me some pointer how this could be done.
2.3 uses gawk for listcon and listproj, but gawk has been replaced with the following grep command:
grep -w -o '@[^ ]\+' "$TODO_FILE" | sort -u
and
grep -w -o '+[^ ]\+' "$TODO_FILE" | sort -u
Using Mac OS X 10.5's grep, neither of these work correctly (at least for me). listcon
returns a list of all tasks with a context (the full task name) and listproj
does the same for projects.
A fix?: If I simply remove the -w
from grep, both work fine. I don't know enough about grep to know if this is a problem with 10.5's grep (or even my particular configuration somehow) or if the -w is not really needed. (-w = --word-regexp, "Select only those lines containing matches that form whole words.")
Hello,
I'm new to this format, and I was wondering how I should interpret the following task:
x 2014-08-29 Test @context +project
It starts with a "x", so it is a completed task. So, 2014-08-29 might be interpreted as the "completion date".
However, the task could be seen as "no priority" and "no completion date", and then the date 2014-08-29 might be interpreted as well as the "creation date".
Any help would be appreciated.
Thanks,
Alessandro
I suggest that the index numbers should stay the same after operations. At the present they change e.g. after the "do" command.
This could be achieved by replacing "done" items with a single line only containing an "x" instead of removing the line completely from todo.txt
This way you could list and do subsequent operations like "do", "do", "add", "change priority", and so on, and be sure the displayed index numbers still apply. This could reduce the number of mistakes in day to day operation I believe.
[edit]
This would also solve #3 (no safeguard to do twice), because the second "do" would operate on the same entry
[/edit]
A minor drawback would be that some sort of "compress" command would be necessary to get rid of all the lines with the "x" on them when desired.
To allow date formats to be customizable via the todo config file.
ie. 'Year-Month-Day Hour:Minute:second'
I just installed todotxt from MacPorts, but it wouldn't work properly until I created ~/.todo and a ~/.todo/config with something like:
export TODO_DIR="$HOME/Dropbox/todo"
export TODO_FILE="$TODO_DIR/todo.txt"
export DONE_FILE="$TODO_DIR/done.txt"
export REPORT_FILE="$TODO_DIR/report.txt"
export TMP_FILE="/tmp/todo.tmp"
export TODOTXT_DEFAULT_ACTION=ls
I couldn't find any documentation on these variables here, so I guess there's something I'm missing. If not, maybe these should go into the quick start guide?
ad@pc200:~$ t add todo1 TODO: 'todo1' added on line 12. ad@pc200:~$ t pri 12 a 12: (A) todo1 TODO: 12 prioritized (A). ad@pc200:~$ t ls 12 12 (A) todo1 ad@pc200:~$ t replace 12 "todo1 changed" replaced with 12: todo1 changed ad@pc200:~$ t ls 12 12 todo1 changed
In the last line you see it lost its priority after replacement. A user would not expect this, so it is an issue?
I'm new to todo.txt so sorry if I'm missing something, but would it be more useful if the default action was ls
rather than showing the usage summary. Usage can always be checked with -h
. Just a newbie thought.
$ t a "foo > bar > baz"
This will add three separate items. By default this shouldn't happen (though an add-on that overrides the add command and allows for multiple line entry in one shot is a good idea).
Discussion thread: http://tech.groups.yahoo.com/group/todotxt/message/2146
nyx:~ gina$ t add "This"
TODO: '2009-04-30 This' added on line 39.
nyx:~ gina$ t app 39 "& that"
39: 2009-04-30 This 2009-04-30 This that
nyx:~ gina$ t replace 39 "this & that"
39: 2009-04-30 This 2009-04-30 This that
replaced with
39: this 2009-04-30 This 2009-04-30 This that that
nyx:~ gina$
Is there a screen widget for todo.txt for Android, that would allow you to see your task list (or part of it) w/o having to click the icon?
Hi,
I am having issue with the highlighting. The color doesn't get displayed. I only have TODO_DIR
modified in the config file. I'm using 2.9 on OS X with iTerm2. I don't think iTerm2 color profile has anything to do with this as I have the same problem in Terminal. It's not my zsh settings (using oh-my-zsh) as well as switching to bash doesn't help. I tried uncommenting the color map setting still doesn't help.
I searched for the problem on the web or in this issue archive and couldn't find the similar problem. I have no idea what else to check. Appreciate your advise. Thanks!
Is there a way from the command line to reorder tasks in the todo file?
Like every (A) tasks would be moved to top of file, same for every other priorities.
I installed the google tasks extension by following the instructions provided in its readme. The google-python-api, as well as the oauth package is successfully installed. It still shows this error, when I try to run todo.sh google ...
Link for the discussion group doesn't work so I'm posting here.
Keep up the good work =)
Whenever I list my tasks I get this error:
tr: extra operand [A-Z]' Try
tr --help' for more information.
I've tried it on 2 platforms: ubuntu 10.10, cygwin and get the same result.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.