mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge pull request #11553 from guevaraya/master
Translated by Guevaraya
This commit is contained in:
commit
89b68691cf
@ -1,128 +0,0 @@
|
||||
Translating by Guevaraya
|
||||
|
||||
'Getting to Done' on the Linux command line
|
||||
======
|
||||
|
||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_terminals.png?itok=CfBqYBah)
|
||||
There is a lot of talk about getting things done at the command line. How many articles are there about using obscure flags with `ls`, nifty regular expressions with Sed and Awk, and how to parse out lots of text with Perl? That isn't what this is about.
|
||||
|
||||
This is about [Getting _to_ Done][1], making sure that the stuff we have to do actually gets tracked and done using tools that don't require a graphical desktop, a web browser, or an internet connection. To do this, we'll look at four ways of tracking your to-do list: plaintext files, Todo.txt, TaskWarrior, and Org-mode.
|
||||
|
||||
### Plain (and simple) text
|
||||
|
||||
|
||||
![plaintext][3]
|
||||
|
||||
I like to use Vim, but you can use Nano too.
|
||||
|
||||
The most straightforward way to manage your to-do list is using a plaintext file in your editor of choice. Just open an empty file and add tasks, one per line. When you are done, delete the line. Simple, effective, and it doesn't matter what you use to do it. There are a couple of drawbacks to this method, though. Once you delete a line and save the file, it is gone forever. That can be a problem if you have to report on what you have done this week or last week. And while using a simple file is flexible, it can also get cluttered really easily.
|
||||
|
||||
### Todo.txt: Plaintext leveled up
|
||||
|
||||
|
||||
![todo.txt screen][5]
|
||||
|
||||
Neat, organized, and easy to use
|
||||
|
||||
That leads us to the [Todo.txt][6] file format and application. Installation is simple—[download][7] the latest release from GitHub and run `sudo make install` from the unpacked archive.
|
||||
|
||||
|
||||
![Installing todo.txt][9]
|
||||
|
||||
It works from a Git clone as well.
|
||||
|
||||
Todo.txt makes it very easy to add tasks, list tasks, and mark them as done:
|
||||
|
||||
| `todo.sh add "Some Task"` | add "Some Task" to my todo list |
|
||||
| `todo.sh ls` | list all my tasks |
|
||||
| `todo.sh ls due:2018-02-15` | list all tasks due on February 15, 2018 |
|
||||
| `todo.sh do 3` | mark task number 3 as "done" |
|
||||
|
||||
The actual list is still in plaintext, and you can edit it with your favorite text editor as long as you follow the [correct format][10].
|
||||
|
||||
There is also a very robust help built into the application.
|
||||
|
||||
|
||||
![Syntax highlighting in todo.txt][12]
|
||||
|
||||
You can even get syntax highlighting.
|
||||
|
||||
There is also a large selection of add-ons, as well as specifications for writing your own. There are even browser extensions, mobile apps, and desktop apps that support the Todo.txt format.
|
||||
|
||||
|
||||
![GNOME extensions in todo.txt][14]
|
||||
|
||||
Even GNOME extensions.
|
||||
|
||||
The biggest drawback to Todo.txt is the lack of an automatic or built-in synchronization mechanism. Most (if not all) of the browser extensions and mobile apps require Dropbox to perform synchronization between the app and the copy on your desktop. If you would like something with sync built-in, we have...
|
||||
|
||||
### Taskwarrior: Now we're cooking with Python
|
||||
|
||||
[Taskwarrior][15] is a Python application with many of the same features as Todo.txt. However, it stores the data in a database and has built-in synchronization capabilities. It also keeps track of what is next, notes how old tasks are, and will warn you if you have something more important to do than what you just did.
|
||||
|
||||
[Installation][16] of Taskwarrior can be done either with your distribution's package manager, through Python's `pip` utility, or built from source. Using it is also pretty straightforward, with commands similar to Todo.txt:
|
||||
|
||||
| `task add "Some Task"` | Add "Some Task" to the list |
|
||||
| `task list` | List all tasks |
|
||||
| `task list due ``:today` | List all tasks due on today's date |
|
||||
| `task do 3` | Complete task number 3 |
|
||||
|
||||
Taskwarrior also has some pretty nice text user interfaces.
|
||||
|
||||
![Taskwarrior in Vit][18]
|
||||
|
||||
I like Vit, which was inspired by Vim.
|
||||
|
||||
Unlike Todo.txt, Taskwarrior can synchronize with a local or remote server. A very basic synchronization server called `taskd` is available if you wish to run your own, and there are several services available if you do not.
|
||||
|
||||
Taskwarrior also has a thriving and extensive ecosystem of add-ons and extensions, as well as mobile and desktop apps.
|
||||
|
||||
![Taskwarrior on GNOME][20]
|
||||
|
||||
Taskwarrior looks really nice on GNOME.
|
||||
|
||||
The only disadvantage to Taskwarrior is that, unlike the other programs listed here, you cannot directly modify the to-do list itself. You can export the task list to various formats, modify the export, and then re-import the files, but it is a lot clunkier than just opening the file directly in a text editor.
|
||||
|
||||
Which brings us to the most powerful of them all...
|
||||
|
||||
### Emacs Org-mode: Hulk smash tasks
|
||||
|
||||
![Org-mode][22]
|
||||
|
||||
Emacs has everything.
|
||||
|
||||
Emacs [Org-mode][23] is by far the most powerful, most flexible open source to-do list manager out there. It supports multiple files, uses plaintext, is almost infinitely customizable, and understands calendars, due dates, and schedules. It is also significantly more complicated to set up than the other applications listed here. But once it is set up, it does everything the other applications do and more. If you are familiar with or a fan of [Bullet Journals][24], Org-mode is possibly the closest you can get on a computer.
|
||||
|
||||
Org-mode will run anywhere Emacs runs, and there are a few mobile applications that can interact with it as well. Unfortunately, there are no desktop apps or browser extensions that support Org. Despite all that, Org-mode is still one of the best applications for tracking your to-do list, since it is so very powerful.
|
||||
|
||||
### Choose your tool
|
||||
|
||||
In the end, the goal of all these programs is to help you track what you need to do and make sure you don't forget to do something. While they all have the same basic functions, choosing which one is right for you depends on a lot of factors. Do you want synchronization built-in or not? Do you need a mobile app? Do any of the add-ons include a "must have" feature? Whatever your choice, remember that the program alone cannot make you more organized, but it can help.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/2/getting-to-done-agile-linux-command-line
|
||||
|
||||
作者:[Kevin Sonney][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:
|
||||
[1]:https://www.scruminc.com/getting-done/
|
||||
[3]:https://opensource.com/sites/default/files/u128651/plain-text.png (plaintext)
|
||||
[5]:https://opensource.com/sites/default/files/u128651/todo-txt.png (todo.txt screen)
|
||||
[6]:http://todotxt.org/
|
||||
[7]:https://github.com/todotxt/todo.txt-cli/releases
|
||||
[9]:https://opensource.com/sites/default/files/u128651/todo-txt-install.png (Installing todo.txt)
|
||||
[10]:https://github.com/todotxt/todo.txt
|
||||
[12]:https://opensource.com/sites/default/files/u128651/todo-txt-vim.png (Syntax highlighting in todo.txt)
|
||||
[14]:https://opensource.com/sites/default/files/u128651/tod-txt-gnome.png (GNOME extensions in todo.txt)
|
||||
[15]:https://taskwarrior.org/
|
||||
[16]:https://taskwarrior.org/download/
|
||||
[18]:https://opensource.com/sites/default/files/u128651/taskwarrior-vit.png (Taskwarrior in Vit)
|
||||
[20]:https://opensource.com/sites/default/files/u128651/taskwarrior-gnome.png (Taskwarrior on GNOME)
|
||||
[22]:https://opensource.com/sites/default/files/u128651/emacs-org-mode.png (Org-mode)
|
||||
[23]:https://orgmode.org/
|
||||
[24]:http://bulletjournal.com/
|
@ -0,0 +1,128 @@
|
||||
享受Linux下命令行全操作
|
||||
======
|
||||
|
||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_terminals.png?itok=CfBqYBah)
|
||||
很多文章讨论关于命令行下如何做事情。有多少文章要么用晦涩的方式介绍 `ls` ,要么介绍关于 Sed 和 Awk 一些有意思的正则表达式,要么就是介绍一大堆的 perl 脚本是如何解析的?这些都不是命令行操作的重点。
|
||||
|
||||
本文章是关于[享受命令行全操作][1],在我们不需要图形桌面,网络浏览器或网络连接情况下,用命令行操作能完成实际事务的跟踪。为了达到这一点,我们将介绍四个途径跟踪你的待办清单:纯文件文件,Todo.txt,TaskWarrior,Org-mode。
|
||||
|
||||
### 纯文本
|
||||
|
||||
![plaintext][3]
|
||||
|
||||
我喜欢用 Vim ,其实你也可以喜欢 Nano。
|
||||
|
||||
最直接管理管理你的待办清单的方式就是用纯文本文件来编辑。只需要打开一个空文件,每一行添加一个任务。当任务完成后,删除这一行,简单有效,不用再关心这一行之前干什么用的了。不过这个方法也有缺点,一点你删除一行并保存了文件,它就是永远消失了。如果你想知道本周或者上周都做了哪些事情,就成了问题。使用简单文本文件很方便却也容易导致混乱。
|
||||
|
||||
### Todo.txt: 纯文件的升级版
|
||||
|
||||
|
||||
![todo.txt screen][5]
|
||||
|
||||
整洁,有条理,易用
|
||||
|
||||
这就是我们要说的 [Todo.txt][6] 格式文件和应用程序。安装可从 GitHub [下载][7]最新的版本解压后并执行命令 `sudo make install`
|
||||
|
||||
![安装 todo.txt][9]
|
||||
|
||||
也可以从 Git 克隆一个。
|
||||
|
||||
Todo.txt 可以很容易的增加新任务,并能显示任务列表和已完成任务的标记:
|
||||
|
||||
|||
|
||||
| ------------- |:-------------|
|
||||
| `todo.sh add "某任务"` | 增加 "某任务" 到你的待办列表 |
|
||||
| `todo.sh ls` | 显示所有的任务 |
|
||||
| `todo.sh ls due:2018-02-15` | 显示2018-02-15之前的所有任务 |
|
||||
| `todo.sh do 3` | 标记任务3 为已完成任务 |
|
||||
|
||||
清单实际上仍然是纯文本,你可以用你喜欢的编辑器遵循[正确的格式][10]编辑它。
|
||||
|
||||
应用程序同时也内置了一个强大的帮助。
|
||||
|
||||
|
||||
![在 todo.txt 中语法高亮][12]
|
||||
|
||||
你可以使用语法高亮的功能
|
||||
|
||||
此外,还有许多附加组件可供选择,以及编写自己的附件组件规范。甚至有浏览器组件,移动设备应用程序和桌面应用程序支持 Todo.txt 的格式。
|
||||
|
||||
|
||||
![GNOME extensions in todo.txt][14]
|
||||
|
||||
GNOME的扩展组件
|
||||
|
||||
Todo.txt 最大的缺点是缺少自动或内置的同步机制。大多数(不是全部)的浏览器扩展程序和移动应用程序需要用 Dropbox 实现桌面系统和应用程序直接的数据同步。如果你想内置同步机制,我们也有……
|
||||
|
||||
### Taskwarrior: 现在我们用 Python 做事了
|
||||
|
||||
[Taskwarrior][15] 是一个与Todo.txt 有许多相同功能的 Python 工具。但不同的是它的数据保存在数据库里并具有内置的数据同步功能。它还可以跟踪即将要做的任务,可以提醒某个任务持续了多久,可以提醒你一些重要的事情应该马上去做。
|
||||
|
||||
[安装][16] Taskwarrior 可以通过通过发行版自带的包管理器,或通过 Python 命令 `pip`安装,或者用源码编译。用法也和 Todo.txt 的命令完全一样:
|
||||
|
||||
|||
|
||||
| ------------- |:-------------|
|
||||
| `task add "某任务"` | 增加 "某任务" 到任务清单 |
|
||||
| `task list` | 列出所有任务 |
|
||||
| `task list due ``:today` |列出截止今天的任务 |
|
||||
| `task do 3` | 标记编号是3的任务为完成状态 |
|
||||
|
||||
Taskwarrior 还有漂亮的文本用户界面。
|
||||
|
||||
![Taskwarrior in Vit][18]
|
||||
|
||||
我喜欢 Vit, 它的设计灵感来自 Vim.
|
||||
|
||||
不同于 Todo.txt,Taskwarrior 可以和本地或远程服务器同步信息。如果你希望运行自己的同步服务器可以使用名为 `taskd` 的基础服务器,如果不使用自己的服务器也有好几个可用服务器。
|
||||
|
||||
Taskwarriot 还拥有一个蓬勃发展的插件和扩展生态系统,这和移动和桌面系统的应用生态类似。
|
||||
|
||||
![GNOME in Taskwarrior ][20]
|
||||
|
||||
在 GNOME 下的 Taskwarrior 看起来还是很漂亮的。
|
||||
|
||||
Taskwarrior 有一个唯一的缺点,你是不能直接修改待办任务的,这和其他的工具不一样。你只能把任务清单按照格式导出,然后修改导出文件后,重新再导入,这样相对于编辑器直接编辑任务还是挺麻烦的。
|
||||
|
||||
谁能给我们带来最大的希望呢......
|
||||
|
||||
### Emacs Org-mode: 牛逼的任务收割机
|
||||
|
||||
![Org-mode][22]
|
||||
|
||||
Emacs 具有所有优点。
|
||||
|
||||
Emacs [Org-mode][23] 是目前为止最强大,最灵活的开源待办任务管理器。它支持多文件,使用纯文本,高度定制和自动识别日期,截止日期和任务计划。相对于我们这里介绍的其他工具,它的配置也更复杂一些。但是一旦配置好,她可以比其他工具完成更多功能。如果你是熟悉或者是 [Bullet Journals][24] 的粉丝,Org-mode 可能是在桌面程序里最像[Bullet Journals][24]的了。
|
||||
|
||||
Org-mode 可以运行在任何 Emacs 运行的地方,一些移动应用程序可以和它很好交互。但是不幸的是,目前没有桌面程序或浏览器插件支持Org-mode。尽管如此,Org-mode仍然是跟踪待办事项最好的应用程序之一,因为他确实很强大。
|
||||
|
||||
### 选择适合自己的工具
|
||||
|
||||
最后,这些程序目的是帮助你跟踪待办事务并确保不会忘记做某个事情。这些程序的基础功能都大同小异,那一款适合你取决于多种因素。有的人需要自带同步功能,有的人需要一个移动客户端,有的人要必须支持插件。不管你选择什么,请记住程序本身不会让你更有调理,但是可以帮助你。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/2/getting-to-done-agile-linux-command-line
|
||||
|
||||
作者:[Kevin Sonney][a]
|
||||
译者:[guevaraya](https://github.com/guevaraya)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://opensource.com/users/ksonney (Kevin Sonney)
|
||||
[1]:https://www.scruminc.com/getting-done/
|
||||
[3]:https://opensource.com/sites/default/files/u128651/plain-text.png (plaintext)
|
||||
[5]:https://opensource.com/sites/default/files/u128651/todo-txt.png (todo.txt screen)
|
||||
[6]:http://todotxt.org/
|
||||
[7]:https://github.com/todotxt/todo.txt-cli/releases
|
||||
[9]:https://opensource.com/sites/default/files/u128651/todo-txt-install.png (Installing todo.txt)
|
||||
[10]:https://github.com/todotxt/todo.txt
|
||||
[12]:https://opensource.com/sites/default/files/u128651/todo-txt-vim.png (Syntax highlighting in todo.txt)
|
||||
[14]:https://opensource.com/sites/default/files/u128651/tod-txt-gnome.png (GNOME extensions in todo.txt)
|
||||
[15]:https://taskwarrior.org/
|
||||
[16]:https://taskwarrior.org/download/
|
||||
[18]:https://opensource.com/sites/default/files/u128651/taskwarrior-vit.png (Taskwarrior in Vit)
|
||||
[20]:https://opensource.com/sites/default/files/u128651/taskwarrior-gnome.png (Taskwarrior on GNOME)
|
||||
[22]:https://opensource.com/sites/default/files/u128651/emacs-org-mode.png (Org-mode)
|
||||
[23]:https://orgmode.org/
|
||||
[24]:http://bulletjournal.com/
|
Loading…
Reference in New Issue
Block a user