Giter Site home page Giter Site logo

sjl / t Goto Github PK

View Code? Open in Web Editor NEW
743.0 28.0 114.0 78 KB

A command-line todo list manager for people that want to finish tasks, not organize them. (git mirror)

Home Page: http://stevelosh.com/projects/t/

License: MIT License

Perl 37.09% Python 58.01% Raku 4.90%

t's Introduction

t

t is a command-line todo list manager for people that want to finish tasks, not organize them.

Why t?

Yeah, I know, another command-line todo list manager. Several others already exist (todo.txt and TaskWarrior come to mind), so why make another one?

It Does the Simplest Thing That Could Possibly Work

Todo.txt and TaskWarrior are feature-packed. They let you tag tasks, split them into projects, set priorities, order them, color-code them, and much more.

That's the problem.

It's easy to say "I'll just organize my todo list a bit" and spend 15 minutes tagging your tasks. In those 15 minutes you probably could have finished a couple of them.

t was inspired by j. It's simple, messy, has almost no features, and is extremely effective at the one thing it does. With t the only way to make your todo list prettier is to finish some damn tasks.

It's Flexible

t's simplicity makes it extremely flexible.

Want to edit a bunch of tasks at once? Open the list in a text editor.

Want to view the lists on a computer that doesn't have t installed? Open the list in a text editor.

Want to synchronize the list across a couple of computers? Keep your task lists in a Dropbox folder.

Want to use it as a distributed bug tracking system like BugsEverywhere? Make the task list a bugs file in the project repository.

It Plays Nice with Version Control

Other systems keep your tasks in a plain text file. This is a good thing, and t follows their lead.

However, some of them append new tasks to the end of the file when you create them. This is not good if you're using a version control system to let more than one person edit a todo list. If two people add a task and then try to merge, they'll get a conflict and have to resolve it manually.

t uses random IDs (actually SHA1 hashes) to order the todo list files. Once the list has a couple of tasks in it, adding more is far less likely to cause a merge conflict because the list is sorted.

Installing t

t requires Python 2.5 or newer, and some form of UNIX-like shell (bash works well). It works on Linux, OS X, and Windows (with Cygwin).

Installing and setting up t will take about one minute.

First, download the newest version or clone the Mercurial repository (hg clone https://hg.stevelosh.com/t/). Put it anywhere you like.

Next, decide where you want to keep your todo lists. I put mine in ~/tasks. Create that directory:

mkdir ~/tasks

Finally, set up an alias to run t. Put something like this in your ~/.bashrc file:

alias t='python ~/path/to/t.py --task-dir ~/tasks --list tasks'

Make sure you run source ~/.bashrc or restart your terminal window to make the alias take effect.

Using t

t is quick and easy to use.

Add a Task

To add a task, use t [task description]:

$ t Clean the apartment.
$ t Write chapter 10 of the novel.
$ t Buy more beer.
$

List Your Tasks

Listing your tasks is even easier -- just use t:

$ t
9  - Buy more beer.
30 - Clean the apartment.
31 - Write chapter 10 of the novel.
$

t will list all of your unfinished tasks and their IDs.

Finish a Task

After you're done with something, use t -f ID to finish it:

$ t -f 31
$ t
9  - Buy more beer.
30 - Clean the apartment.
$

Edit a Task

Sometimes you might want to change the wording of a task. You can use t -e ID [new description] to do that:

$ t -e 30 Clean the entire apartment.
$ t
9  - Buy more beer.
30 - Clean the entire apartment.
$

Yes, nerds, you can use sed-style substitution strings:

$ t -e 9 /more/a lot more/
$ t
9  - Buy a lot more beer.
30 - Clean the entire apartment.
$

Delete the Task List if it's Empty

If you keep your task list in a visible place (like your desktop) you might want it to be deleted if there are no tasks in it. To do this automatically you can use the --delete-if-empty option in your alias:

alias t='python ~/path/to/t.py --task-dir ~/Desktop --list todo.txt --delete-if-empty'

Tips and Tricks

t might be simple, but it can do a lot of interesting things.

Count Your Tasks

Counting your tasks is simple using the wc program:

$ t | wc -l
      2
$

Put Your Task Count in Your Bash Prompt

Want a count of your tasks right in your prompt? Edit your ~/.bashrc file:

export PS1='[$(t | wc -l | sed -e"s/ *//")]'" $PS1"

Now you've got a prompt that looks something like this:

[2] $ t -f 30
[1] $ t Feed the cat.
[2] $

Multiple Lists

t is for people that want to do tasks, not organize them. With that said, sometimes it's useful to be able to have at least one level of organization. To split up your tasks into different lists you can add a few more aliases:

alias g='python ~/path/to/t.py --task-dir ~/tasks --list groceries'
alias m='python ~/path/to/t.py --task-dir ~/tasks --list music-to-buy'
alias w='python ~/path/to/t.py --task-dir ~/tasks --list wines-to-try'

Distributed Bugtracking

Like the idea of distributed bug trackers like BugsEverywhere, but don't want to use such a heavyweight system? You can use t instead.

Add another alias to your ~/.bashrc file:

alias b='python ~/path/to/t.py --task-dir . --list bugs'

Now when you're in your project directory you can use b to manage the list of bugs/tasks for that project. Add the bugs file to version control and you're all set.

Even people without t installed can view the bug list, because it's plain text.

Problems, Contributions, Etc

t was hacked together in a couple of nights to fit my needs. If you use it and find a bug, please let me know.

If you want to request a feature feel free, but remember that t is meant to be simple. If you need anything beyond the basics you might want to look at todo.txt or TaskWarrior instead. They're great tools with lots of bells and whistles.

If you want to contribute code to t, that's great! Get the Mercurial repository or the git mirror on GitHub and send me a patch or pull request.

t's People

Contributors

brennerm avatar dimo414 avatar djlauk avatar nfultz avatar pendashteh avatar pfmoore avatar sharat87 avatar sjl avatar thesealion 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

t's Issues

Integration with fzf or similar

Thanks for the project, seems interesting. Is it possible to use fzf or any other file finder to select between list files in a folder for example? Thanks again

Doesn't work with python 3

This isn't exactly a bug, but I thought I'd let you know anyway. When I first tried to run t, I got a python error. The problem is that I am running python 3.4, while t was written for python 2. For example, the code includes print string rather than print(string), etc.

Fortunately I also still had python 2.7 installed, so I just called it using the absolute file path in my bash alias and everything is working fine. You might just want to mention this in the install instructions.

task id's being generated randomly and are changing

Tasks desc below represents the task order in which they are added. You can see the task id generated here being either alpha or numeric without any order
$ t
5 - third_task
6 - 4th_task
a - first task
e - sec task
f - fifth task

Next, when 6th task is added, 4th task id is changed.
$ t 6th_task
$ t
5 - third_task
69 - 6th_task
6b - 4th_task
a - first task
e - sec task
f - fifth task

Thanks,
Om

Return task id after adding

If you made a mistake this helps to quickly edit the ID without having to look trough the whole list to find your id

T

Network: Wifi
Wifi SSID:
IPv4: 10.0.0.247
IPv6: FE80::7C26:7EFF:FEC9:8EF0
Mac Address: null
CallState: 0
DataActivity: 0
DataState: 0
GroupIdLevel1:
MMS User Agent Profile URL: http://www.google.com/oha/rdf/ua-profile-kila.xml
MMS User Agent: Android-Mms/0.1
Network Country ISO:
Network Operator:
Network Operator Name:
Network Roaming: false
Network Type: 0
Phone Type: 0
Sim Country ISO:
Sim Operator:
Sim Operator Name:
ICCID: No permission after Android 10
Sim State: 0
IMSI: No permission after Android 10

Breaking t with apostrophes

image

When writing a single apostrophe, the program seems to fall into full chaos mode.
I have tried no variants as I did not want to clog up my list of tasks with junk errors.

Thoughts?

Editing task should update the task ID

E.g. At first I have a task "abc":
t abc
(abc | id:a9993e364706816aba3e25717850c26c9cd0d89d)

Then I change it to "cde":
t -e a cde
(cde | id:a9993e364706816aba3e25717850c26c9cd0d89d)

Then assume I find "abc" should be a separate task, so I add the task again:
t abc
(abc | id:a9993e364706816aba3e25717850c26c9cd0d89d)

But, the updated task "cde" is missing (overridden by the new added task).

I suggest the ID is also re-generated when editing tasks.

Make the promt speedier

According to my calcualations

[ ~ ] % t | wc -l | awk '{ print $1 }' | time
shell  0,07s user 0,03s system 0% cpu 25,175 total
children  0,44s user 0,23s system 2% cpu 25,175 total
[ ~ ] % t | wc -l | sed -e's/ *//' | time
shell  0,07s user 0,04s system 0% cpu 31,230 total
children  0,57s user 0,27s system 2% cpu 31,230 total

So, it would be more officient to use awk instead of sed when formatting the todo count into your prompt.
Just an observation tho

Detect and open URL's

It would be nice if t could detect and open urls in a task – maybe also adding a pop-function, to open the URL and get rid of the task in one instance :)
Which browser to use? This could be passed to t as part of the alias.

When the task text contains a url it could minify it automatically

It would be nice if it could minify urls contained in the task. Obviously, some people like to use t offline, so this could be a flag based feature (we would probably be hitting some API to get the minified url).

For example:

$ t --minify-url Comment on PR: https://github.com/megacorp/proj/pull/5
$ t
4 - Comment on PR: https://bit.ly/234rkYC

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.