translated

This commit is contained in:
geekpi 2018-04-08 08:41:27 +08:00
parent f3317fc791
commit 248add7f52
2 changed files with 68 additions and 70 deletions

View File

@ -1,70 +0,0 @@
translating---geekpi
4 command line note-taking applications for Linux
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/note-taking.jpeg?itok=fiF5EBEb)
When you need to save a code snippet or a URL, an idea or a quote, you probably fire up a text editor or turn to a [desktop][1] or [web-based][2] note-taking tool. But those aren't your only options. If you spend time working in terminal windows, you can use one of the many note-taking tools available for the Linux command line.
Let's take a look at of those four apps.
### tnote
[tnote][3] makes taking notes in a terminal window very simple—almost too simple.
tnote is a single Python script. When you start it for the first time, it asks you to enter a password and a passphrase to encrypt the [SQLite database][4] that stores your notes. Once you've done that, press "A" to create a note. Type your note, then press CTRL-D to save it.
Once you have a few (or more than a few) notes, you can view them or search for specific ones, words or phrases, or tags. tnote doesn't pack a lot of features, but it does get the job done.
### Terminal Velocity
If you've used Mac OS, you might have come across a popular open source note-taking application called [Notational Velocity][5], a simple and effective way to take notes. [Terminal Velocity][6] does a good job of bringing the Notational Velocity experience to the command line.
Terminal Velocity opens your default text editor (set by the `$EDITOR` variable in your `.profile` or `.bashrc` file). Type your note, then save it. The note appears in the list in the Terminal Velocity window.
Use the arrow keys on your keyboard to scroll through your list of notes. To view or edit a note, press Enter. If you have a long list of notes, you can enter the first few characters of the note's title in the `Find or Create` field to narrow down the list. From there, scroll to the note and press Enter to open it.
### pygmynote
Of the four applications in this article, [pygmynote][7] is probably the least user-friendly. It is, however, the most flexible.
Like tnote, pygmynote saves your notes and attachments in an SQLite database. When you fire it up, pygmynote doesnt look particularly useful. At any time, type `help` and press Enter to get a list of commands.
You can add and edit notes, view and search for them, and add [tags][8] to your notes. Tags make finding notes easier, especially if you have a lot of them.
What gives pygmynote flexibility is its ability to add attachments to your notes. Those attachments can be anything: an image, a text or word processor file, a PDF, a spreadsheet, or anything else relevant to the note.
### jrnl
[jrnl][9] is the odd application out here. As you've probably guessed from its name, jrnl is intended to be a journaling tool. But that doesn't mean you can't take notes with it. jrnl does that job very well.
When you first start jrnl, it asks you where you want to put the file `journal.txt` (which stores your notes), and if you want to password-protect the file. If you decide to add a password, you need to enter it whenever you do anything with the application.
You can enter notes in two ways: directly from the command line, or with your computer's default editor. You can add tags—for example,`@opensource.com`—to your notes, and give them a date and timestamp. Adding tags and dates can help you search for your notes (jrnl has a pretty decent search feature) if you have a lot of them.
Since jrnl saves your notes in a plain text file, you can sync it across your devices using [ownCloud][10], [Nextcloud][11], or whatever file sharing/syncing service your prefer.
Do you have a favorite tool or hack for taking notes at the command line? Feel free to share it with the community by leaving a comment.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/3/command-line-note-taking-applications
作者:[Scott Nesbitt][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/scottnesbitt
[1]:https://opensource.com/life/16/9/4-desktop-note-taking-applications
[2]:https://opensource.com/alternatives/evernote
[3]:https://github.com/tasdikrahman/tnote
[4]:http://en.wikipedia.org/wiki/SQLite
[5]:http://notational.net/
[6]:https://vhp.github.io/terminal_velocity/
[7]:https://github.com/dmpop/pygmynote
[8]:https://en.wikipedia.org/wiki/Tag_(metadata)
[9]:http://jrnl.sh/
[10]:https://owncloud.com/
[11]:https://nextcloud.com/

View File

@ -0,0 +1,68 @@
Linux 下的 4 个命令行笔记记录程序
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/note-taking.jpeg?itok=fiF5EBEb)
当你需要保存代码段或 URL、想法或引用时可能会启动文本编辑器或使用[桌面][1]或[基于 Web 的] [2]笔记记录工具。但那些不是你唯一的选择。如果你在终端窗口中工作,则可以使用 Linux 命令行下的许多笔记记录工具之一。
我们来看看这四个程序。
### tnote
[tnote][3] 使在终端窗口中记笔记很简单 - 几乎太简单了。
tnote 是一个 Python 脚本。首次启动时,它会要求你输入密码和口令来加密存储笔记的[ SQLite 数据库][4]。完成之后,按 “A” 创建一个笔记。输入你的笔记,然后按 CTRL-D 保存。
一旦你有几个或多个笔记你可以查看它们或搜索特定的笔记单词或短语或标签。tnote 不包含很多功能,但它确实实现了任务。
### Terminal Velocity
如果你使用的是 Mac OS你可能会看到一个名为 [Notational Velocity][5] 的流行开源笔记程序,这是一种记录笔记的简单有效方法。[Terminal Velocity][6] 在将 Notational Velocity 体验带入命令行方面做得很好。
Terminal Velocity 打开你的默认文本编辑器(由你的 `.profile``.bashrc` 文件中的 `$EDITOR` 变量设置)。输入你的笔记,然后保存。该笔记出现在 Terminal Velocity 窗口的列表中。
使用键盘上的箭头键滚动查看你的笔记列表。要查看或编辑笔记,请按 Enter 键。如果你有一长串笔记,则可以在 `Find or Create` 字段中输入笔记标题的前几个字符以缩小列表的范围。在那里滚动笔记并按下 Enter 键将其打开。
### pygmynote
在本文中的四个应用中,[pygmynote][7] 可能是最不用户友好的。然而,它是最灵活的。
像 tnote 一样pygmynote 将你的笔记和附件保存在 SQLite 数据库中。当你启动它时pygmynote 看起来并不特别有用。在任何时候,输入 `help` 并按下 Enter 键获取命令列表。
你可以添加、编辑、查看和搜索笔记,并在笔记中添加[标签][8]。标签使找到笔记更容易,特别是如果你有很多笔记的时候。
pygmynote 的灵活性在于它能够将附件添加到笔记中。这些附件可以是任何东西图像、文本、word、PDF、电子表格或与笔记相关的任何其他内容。
### jrnl
[jrnl][9] 是这里的一个奇怪应用。正如你可能从它的名字中猜到的那样jrnl 意在成为一种日记工具。但这并不意味着你不能记笔记。 jrnl 做得很好。
当你第一次启动 jrnl 时,它会询问你想把文件 `journal.txt` (它存储你的笔记)保存的位置以及是否需要密码保护。如果你决定添加密码,那么你在应用内的操作都需要输入密码。
你可以通过两种方式输入笔记:直接从命令行或使用计算机的默认编辑器。你可以将标签(例如,`@opensource.com`添加到笔记中并指定日期和时间戳。如果你有很多笔记的话添加标签和日期可以帮助搜索你的笔记jrnl 有一个相当不错的搜索功能)。
由于 jrnl 将你的笔记保存为纯文本文件,因此你可以使用 [ownCloud][10]、[Nextcloud][11] 或任何你喜欢的文件共享/同步服务在设备间同步它。
你有没有喜欢的工具或自制的命令行笔记工具?请发表评论,随时与社区分享。
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/3/command-line-note-taking-applications
作者:[Scott Nesbitt][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/scottnesbitt
[1]:https://opensource.com/life/16/9/4-desktop-note-taking-applications
[2]:https://opensource.com/alternatives/evernote
[3]:https://github.com/tasdikrahman/tnote
[4]:http://en.wikipedia.org/wiki/SQLite
[5]:http://notational.net/
[6]:https://vhp.github.io/terminal_velocity/
[7]:https://github.com/dmpop/pygmynote
[8]:https://en.wikipedia.org/wiki/Tag_(metadata)
[9]:http://jrnl.sh/
[10]:https://owncloud.com/
[11]:https://nextcloud.com/