Git Product home page Git Product logo

todo.txt-cli's Introduction

todo.txt-cli

A simple and extensible shell script for managing your todo.txt file.

CI GitHub issues GitHub forks GitHub stars GitHub license Gitter

gif

Read our contributing guide if you're looking to contribute (issues/PRs/etc).

Installation

Download

Download the latest stable release for use on your desktop or server.

OS X / macOS

brew install todo-txt

# For macOS on x86 CPU 
cp -n /usr/local/opt/todo-txt/todo.cfg ~/.todo.cfg

# For macOS on arm CPU
cp -n /opt/homebrew/opt/todo-txt/todo.cfg ~/.todo.cfg

Note: The -n flag for cp makes sure you do not overwrite an existing file.

Linux

From command line

make
make install
make test

NOTE: Makefile defaults to several default paths for installed files. Adjust to your system:

  • INSTALL_DIR: PATH for executables (default /usr/local/bin)
  • CONFIG_DIR: PATH for todo.txt config
  • BASH_COMPLETION: PATH for autocompletion scripts (default to /etc/bash_completion.d)
make install CONFIG_DIR=/etc INSTALL_DIR=/usr/bin BASH_COMPLETION=/usr/share/bash-completion/completions

Arch Linux (AUR)

https://aur.archlinux.org/packages/todotxt/

Usage

todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description]

For example, to add a todo item, you can do:

todo.sh add "THING I NEED TO DO +project @context"

Read about all the possible commands in the USAGE file.

Release History

See CHANGELOG.md

Support

Code of Conduct

Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Contributing

We welcome all contributions. First read our Contributor Code of Conduct and then get started contributing.

License

GNU General Public License v3.0 © todo.txt org

todo.txt-cli's People

Contributors

ad1217 avatar benjaminoakes avatar chrysle avatar colega avatar cybrilla-rajaravivarma avatar dhein avatar doegox avatar edgewood avatar ginatrapani avatar godlygeek avatar guildencrantz avatar gutierri avatar harding avatar inkarkat avatar joshmoore avatar karbassi avatar mbrubeck avatar mikewest avatar mivok avatar nightflyer avatar njwilson avatar onovy avatar paulroub avatar pdclark avatar rfrancis avatar sit avatar thann avatar the1ts avatar tpikonen avatar trajano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

todo.txt-cli's Issues

documentation on use within a team

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

grep -w, listcon and listproj in OS X 10.5

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.")

I can't get todo to work in cron job

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.

$TODO_SH should contain full file path

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)?

source

Color doesn't get displayed

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!

hide tasks

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.

Create .todo/config

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?

Inline mode not supported by NetBSD's sed

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.

do: todos purged, backup allright, wrong sed expression

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 ;)

Puzzling about dates

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

Index numbers should stay the same after operations

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.

prepend not correct on prioritized tasks

$ 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

Replacing 'add' 'rm' and other built-in commands

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.

Completed tasks without a date

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.

ImportError: No module named gflags

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 ...

Customize the list display

How can you quickly customize the list display so it shows something before the todo item, such as a [ ] or the like?

On Windows, help command and short help (-h) flag add and empty task

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.

Widget for Android?

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?

priority lost after replace

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?

Missing howto documentation?

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.

[Feature Request] iCloud Sync

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.

Short help (-h) inaccessible when custom config file path is used

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.

QuickStart Guide gives incorrect info.

" 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

Need feature to move invalid todo items quickly

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 ##

output to file or mail has artifacts I don't recognize

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

^[[1;34m09 (C) collect SSL info and make easily reportable +park @scot^[[0m

TODO: 2 of 13 tasks shown

Start task with @context

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?

Symlink to todo.cfg

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.

Should list be the default action?

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.

do: no safeguard to do twice

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.

Change to more conventional prefixes

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.

a plugin that reminds of things archived as done?

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.

Release v2.9 isn't tagged.

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.

Provide a way to reorder tasks

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.

Zsh auto-completion

The documentation does not provide any help on activating auto-completion using a Zsh shell. Is there any way to enable it?

When using with a webDav mount I experience issues closing tasks.

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.

-p option not working as expected

Hi there!

First of all, thanks for todo-txt. Amazing tool!

I'm having an issue with -p option of the command line tool. It is not working as expected.

Steps:

  • List tasks (using -p)
  • Create sample task (using -p)
  • Mark created task as done (using -p)
  • "Done" message is colored

See screenshot:

captura de pantalla 2013-12-20 a la s 08 54 36

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.