开始使用开源待办事项清单管理器
Todo

> 
> 待办事项清单是跟踪任务列表的强大方法。在我们的 20 个使用开源提升生产力的系列的第七篇文章中了解如何使用它。
> 
> 
> 


![](/data/attachment/album/202001/31/111103kmv55ploshuso4ot.jpg)


去年，我在 19 天里给你介绍了 19 个新（对你而言）的生产力工具。今年，我换了一种方式：使用你在使用或者还没使用的工具，构建一个使你可以在新一年更加高效的环境。


### 使用 todo 跟踪任务


任务管理和待办事项清单是我非常喜欢0的东西。我是一位生产效率的狂热粉丝（以至于我为此做了一个[播客](https://productivityalchemy.com/)），我尝试了各种不同的应用。我甚至为此[做了演讲](https://www.slideshare.net/AllThingsOpen/getting-to-done-on-the-command-line)并[写了些文章](https://opensource.com/article/18/2/getting-to-done-agile-linux-command-line)。因此，当我谈到提高工作效率时，肯定会出现任务管理和待办事项清单工具。


![Getting fancy with Todo.txt](/data/attachment/album/202001/31/111136huqh03nufugn53f3.png)


说实话，由于简单、跨平台且易于同步，用 [todo.txt](http://todotxt.org/) 肯定不会错。它是我不断反复提到的两个待办事项清单以及任务管理应用之一（另一个是 [Org 模式](https://orgmode.org/)）。让我反复使用它的原因是它简单、可移植、易于理解，并且有许多很好的附加组件，并且当一台机器有附加组件，而另一台没有，也不会破坏它。由于它是一个 Bash shell 脚本，我还没发现一个无法支持它的系统。


#### 设置 todo.txt


首先，你需要安装基本 shell 脚本并将默认配置文件复制到 `~/.todo` 目录：



```
git clone https://github.com/todotxt/todo.txt-cli.git
cd todo.txt-cli
make
sudo make install
mkdir ~/.todo
cp todo.cfg ~/.todo/config
```

接下来，设置配置文件。一般，我想取消对颜色设置的注释，但必须马上设置的是 `TODO_DIR` 变量：



```
export TODO_DIR="$HOME/.todo"
```

#### 添加待办事件


要添加第一个待办事件，只需输入 `todo.sh add <NewTodo>` 就能添加。这还将在 `$HOME/.todo/` 中创建三个文件：`todo.txt`、`done.txt` 和 `reports.txt`。


添加几个项目后，运行 `todo.sh ls` 查看你的待办事项。


![Basic todo.txt list](/data/attachment/album/202001/31/111156t9pl8jfp29ep4ej3.png "Basic todo.txt list")


#### 管理任务


你可以通过给项目设置优先级来稍微改善它。要向项目添加优先级，运行 `todo.sh pri # A`。数字是列表中任务的数量，而字母 `A` 是优先级。你可以将优先级设置为从 A 到 Z，因为这是它的排序方式。


要完成任务，运行 `todo.sh do #` 来标记项目已完成并将它移动到 `done.txt`。运行 `todo.sh report` 会向 `report.txt` 写入已完成和未完成项的数量。


所有这三个文件的格式都有详细的说明，因此你可以使用你的文本编辑器修改。`todo.txt` 的基本格式是：



```
(Priority) YYYY-MM-DD Task
```

该日期表示任务的到期日期（如果已设置）。手动编辑文件时，只需在任务前面加一个 `x` 来标记为已完成。运行 `todo.sh archive` 会将这些项目移动到 `done.txt`，你可以编辑该文本文件，并在有时间时将已完成的项目归档。


#### 设置重复任务


我有很多重复的任务，我需要以每天/周/月来计划。


![Recurring tasks with the ice_recur add-on](/data/attachment/album/202001/31/111226g5e65gdvgiepvhpg.png "Recurring tasks with the ice_recur add-on")


这就是 `todo.txt` 的灵活性所在。通过在 `~/.todo.actions.d/` 中使用[附加组件](https://github.com/todotxt/todo.txt-cli/wiki/Todo.sh-Add-on-Directory)，你可以添加命令并扩展基本 `todo.sh` 的功能。附加组件基本上是实现特定命令的脚本。对于重复执行的任务，插件 [ice\_recur](https://github.com/rlpowell/todo-text-stuff) 应该符合要求。按照其页面上的说明操作，你可以设置任务以非常灵活的方式重复执行。


![Todour on MacOS](/data/attachment/album/202001/31/111232idimwielt4vdbfde.png "Todour on MacOS")


在该[附加组件目录](https://github.com/todotxt/todo.txt-cli/wiki/Todo.sh-Add-on-Directory)中有很多附加组件，包括同步到某些云服务，也有链接到桌面或移动端应用的组件，这样你可以随时看到待办列表。


我只是简单介绍了这个代办事项清单功能，请花点时间深入了解这个工具的强大！它确实可以帮助我每天完成任务。




---


via: <https://opensource.com/article/20/1/open-source-to-do-list>


作者：[Kevin Sonney](https://opensource.com/users/ksonney) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Last year, I brought you 19 days of new (to you) productivity tools for 2019. This year, I'm taking a different approach: building an environment that will allow you to be more productive in the new year, using tools you may or may not already be using.

## Track your tasks with todo.txt

Tasks and to-do lists are very near and dear to my heart. I'm a big fan of productivity (so much so that I do a [podcast](https://productivityalchemy.com/) about it) and try all sorts of different applications. I've even [given presentations](https://www.slideshare.net/AllThingsOpen/getting-to-done-on-the-command-line) and [written articles](https://opensource.com/article/18/2/getting-to-done-agile-linux-command-line) about them. So it only makes sense that, when I talk about being productive, task and to-do list tools are certain to come up.

![Getting fancy with Todo.txt](https://opensource.com/sites/default/files/uploads/productivity_7-1.png)

In all honesty, for being simple, cross-platform, and easily synchronized, you cannot go wrong with [todo.txt](http://todotxt.org/). It is one of the two to-do list and task management apps that I keep coming back to over and over again (the other is [Org mode](https://orgmode.org/)). And what keeps me coming back is that it is simple, portable, understandable, and has many great add-ons that don't break it if one machine has them and the others don't. And since it is a Bash shell script, I have never found a system that cannot support it.

### Set up todo.txt

First things first, you need to install the base shell script and copy the default configuration file to the **~/.todo** directory:

```
git clone https://github.com/todotxt/todo.txt-cli.git
cd todo.txt-cli
make
sudo make install
mkdir ~/.todo
cp todo.cfg ~/.todo/config
```


Next, set up the configuration file. I like to uncomment the color settings at this point, but the only thing that must be set up right away is the **TODO_DIR** variable:

`export TODO_DIR="$HOME/.todo"`


### Add to-do's

To add your first to-do item, simply type **todo.sh add <NewTodo>**, and it will be added. This will also create three files in **$HOME/.todo/**: todo.txt, done.txt, and reports.txt.

After adding a few items, run **todo.sh ls** to see your to-do list.

![Basic todo.txt list Basic todo.txt list](https://opensource.com/sites/default/files/uploads/productivity_7-2.png)

### Manage your tasks


You can improve it a little by prioritizing the items. To add a priority to an item, run **todo.sh pri # A**. The number is the number of the task on the list, and the letter "A" is the priority. You can set the priority as anything from A to Z since that's how it will get sorted.

To complete a task, run **todo.sh do #** to mark the item done and move the item to done.txt. Running **todo.sh report** will write a count of done and not done items to reports.txt.

The file format used for all three files is well documented, so you can make changes with your text editor of choice. The basic format of todo.txt is:

`(Priority) YYYY-MM-DD Task`


The date indicates the due date of a task, if one is set. When editing the file manually, just put an "x" in front of the task to mark it as done. Running **todo.sh archive** will move these items to done.txt, and you can work in that text file and archive the done items when you have time.

### Set up recurring tasks

I have a lot of recurring tasks that I need to schedule every day/week/month.

![Recurring tasks with the ice_recur add-on Recurring tasks with the ice_recur add-on](https://opensource.com/sites/default/files/uploads/productivity_7-3.png)

This is where todo.txt's flexibility comes in. By using [add-ons](https://github.com/todotxt/todo.txt-cli/wiki/Todo.sh-Add-on-Directory) in **~/.todo.actions.d/**, you can add commands and extend the functionality of the base todo.sh. The add-ons are basically scripts that implement specific commands. For recurring tasks, the plugin [ice_recur](https://github.com/rlpowell/todo-text-stuff) should fit the bill. By following the instructions on the page, you can set up tasks to recur in a very flexible manner.

![Todour on MacOS Todour on MacOS](https://opensource.com/sites/default/files/uploads/productivity_7-4.png)

There are a lot of add-ons in the directory, including syncing to some cloud services. There are also links to desktop and mobile apps, so you can keep your to-do list with you on the go.

I've only scratched the surface of todo's functionality, so take some time to dig in and see how powerful this tool is! It really helps me keep on task every day.

## 2 Comments