diff --git a/sources/tech/20141210 How to use Evernote from the command line on Linux.md b/sources/tech/20141210 How to use Evernote from the command line on Linux.md deleted file mode 100644 index b6ccffc25f..0000000000 --- a/sources/tech/20141210 How to use Evernote from the command line on Linux.md +++ /dev/null @@ -1,151 +0,0 @@ -Translating--------geekpi - -How to use Evernote from the command line on Linux -================================================================================ -This week let's continue our journey into the depth of the Linux command line to manage and organize information. After managing [your personal expenses][1] from the command line, I propose you to manage your notes from the command line, in particular, when your notes are stored in Evernote. In case you have never heard about it, [Evernote][2] specializes in a user-friendly online service for note-taking with cloud synchronization across multiple devices. Besides offering fancy web-based APIs, Evernote has released Evernote clients for Windows, Mac, [Android][3] and iOS. However, there is, up to today, no official Linux client available. Hopefully, among the plethora of unofficial Linux programs, one emerges and attracts all the command line warriors that we are: [Geeknote][4] - -### Installation of Geeknote ### - -Geeknote is developed in Python. So before trying anything, make sure that you have Python (version 2.7 preferably) and git installed. - -#### Debian, Ubuntu and Linux Mint #### - - $ sudo apt-get install python2.7 git python-setuptools - $ git clone git://github.com/VitaliyRodnenko/geeknote.git - $ cd geeknote - $ sudo python2.7 setup.py install - -#### Fedora or CentOS/RHEL #### - - $ sudo yum install git - $ git clone git://github.com/VitaliyRodnenko/geeknote.git - $ cd geeknote - $ sudo python setup.py install - -#### Arch Linux #### - -For Arch Linux users, just use the package from the [AUR][5]. - -### Basic Usage of Geeknote ### - -Once you installed Geeknote, you should link Geeknote with your Evernote account with: - - $ geeknote login - -Then enter your email address, your password, and your two-factor authentication code. If you do not have the latter, just ignore it and press ENTER. - -![](https://farm8.staticflickr.com/7525/15761947888_7bc71bf216_o.jpg) - -Obviously you need an Evernote account to do all of this, so go register first. - -Once you are all set and ready, you can start playing around, creating new notes and editing them. - -But first, you should set your favorite text editor with: - - $ geeknote settings --editor vim - -Then, the general syntax to create a new note is: - - $ geeknote create --title [title of the new note] (--content [content] --tags [comma-separated tags] --notebook [comma-separated notebooks]) - -In the above, only the title field is required, which corresponds to the title of the new note. The other flags serve to add additional metadata for the note: add some tag(s) as relevant keywords for your note, and specify in which notebook(s) to place the note. Also, if your title or content contain spaces, don't forget to place them in quotation marks. - -For example: - - $ geeknote create --title "My note" --content "This is a test note" --tags "finance, business, important" --notebook "Family" - -Naturally, the next step is to edit your notes. The syntax is very similar: - - $ geeknote edit --note [title of the note to edit] (--title [new title] --tags [new tags] --notebook [new notebooks]) - -Note that the optional parameters such as title, tags, and notebook, serve to modify the metadata of the note. For example, you can rename a note with: - - $ geeknote edit --note [old title] --title [new title] - -Now that the basis of creating and editing is done, the more advanced features are search and deletion. You can search through your notes with the syntax: - - $ geeknote find --search [text-to-search] --tags [comma-separated tags] --notebook [comma-separated notebooks] --date [date-or-date-range] --content-search - -By default, the above command will search notes by their titles. With "--content-search" option, it will search notes by their content. - -For example: - - $ geeknote find --search "*restaurant" --notebooks "Family" --date 31.03.2014-31.08.2014 - -Show all the notes with a specific title by running: - - $ geeknote show [title] - -![](https://farm8.staticflickr.com/7538/15327089024_32867cded6_o.jpg) - -My favorite trick though is probably to use: - - $ geeknote show "*" - -which will display all your notes and allow you to chose one in particular. - -And remove a note with: - - $ geeknote remove --note [title] - -Be careful as this is a real removal. It will delete the note from your cloud storage. - -Finally, there are a lot of options to manage tags and notebooks. I think that the most useful one is probably to display the list of notebooks. - - $ geeknote notebook-list - -![](https://farm8.staticflickr.com/7472/15762063420_43e3ee17da_o.jpg) - -From there, everything is pretty similar. As you can guess, listing all your tags is via: - - $ geeknote tag-list - -Creating a notebook is done via: - - $ geeknote notebook-create --title [notebook title] - -While creating a tag is: - - $ geeknote tag-create --title [tag title] - -Once you get the hang of it, the syntax is really coherent and clear, which is very appreciable. - -If you still want more, don't forget to go checkout the [official documentation][6]. - -### Bonus ### - -As a bonus, Geeknote comes with the utility gnsync, which allows for file synchronization between your Evernote account and your local computer. However, I find its syntax a bit dry: - - $ gnsync --path [where to sync] (--mask [what kind of file to sync] --format [in which format] --logpath [where to write the log] --notebook [which notebook to use]) - -What all of this means is the following. - - -- **--path /home/adrien/Documents/notes/**: location of note files to synchronize with Evernote. -- **--mask "*.txt"**: synchronize only plain text files. By default, gnsync will try to sync every file. -- **--format markdown**: whether you want them as plain or markdown format (the default is plain). -- **--logpath /home/adrien/gnsync.log**: where to write the log for synchronization. In case it goes wrong, gnsync will write logging information there. -- **--notebook "Family"**: in which notebook to synchronize note files. Note that if you leave it empty, a new notebook named after your synced folder will be created. - -To conclude, Geeknote is a fancy little command-line client for Evernote. I personally don't use Evernote that much, but it remains pretty nice and useful. The command line aspect makes it both geeky and easy to combine with a shell script of some sort. Also, there exists a fork program of Geeknote on Git, named [geeknote-improved-git][7] in Archlinux AUR, which pretends to have a few more features and a more active development than the other branch. From what I could see, it is really worth taking a look at. - -What do you think of Geeknote? Is it something you would consider using? Or would you rather stick to the traditional applications? Let us know in the comments. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/evernote-command-line-linux.html - -作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/adrien -[1]:http://xmodulo.com/manage-personal-expenses-command-line.html -[2]:https://evernote.com/ -[3]:http://xmodulo.com/go/android_tutorial -[4]:http://www.geeknote.me/ -[5]:https://aur.archlinux.org/packages/geeknote-git/ -[6]:http://www.geeknote.me/documentation/ -[7]:https://aur.archlinux.org/packages/geeknote-improved-git/ \ No newline at end of file diff --git a/translated/tech/20141210 How to use Evernote from the command line on Linux.md b/translated/tech/20141210 How to use Evernote from the command line on Linux.md new file mode 100644 index 0000000000..a243e67fc4 --- /dev/null +++ b/translated/tech/20141210 How to use Evernote from the command line on Linux.md @@ -0,0 +1,151 @@ +如何在Linux的命令行中使用Evernote +================================================================================ +这周让我们继续什么学习如个使用Linux命令行管理和组织信息。在命令行中管理[你的个人花费][1]后,我建议你在命令行中管理你的笔记,特别地是,当你笔记放在Evernote中时。为防止你从来没有听说过,[Evernote][2]专门有一个用户有好的在线服务用来在不同的设备间同步笔记。除了提供花哨的基于Web的API,Evernote还发布了在Windows、Mac、[Android][3]和iOS上的客户端。然而至今还没有官方的Linux客户端可用。老实说在众多的非官方Linux程序中,一个程序一出现就吸引了所有的命令行爱好者:[Geeknote][4] + +### Geeknote 的安装 ### + +Geeknote使用Python开发的。因此,在开始之前请确保你已经安装了Python(最好是2.7的版本)和git。 + +#### 在 Debian、 Ubuntu 和 Linux Mint 中 #### + + $ sudo apt-get install python2.7 git python-setuptools + $ git clone git://github.com/VitaliyRodnenko/geeknote.git + $ cd geeknote + $ sudo python2.7 setup.py install + +#### 在 Fedora 或者 CentOS/RHEL 中 #### + + $ sudo yum install git + $ git clone git://github.com/VitaliyRodnenko/geeknote.git + $ cd geeknote + $ sudo python setup.py install + +#### 在 Arch Linux 中 #### + +对于ArchLinux用户,只需要使用[AUR][5]中的包。 + +### Geeknote 的基本使用 ### + +一旦你安装玩Geeknote后,你应该将Geeknote与你的Evernote账号关联: + + $ geeknote login + +接着输入你的emial地址、密码、和你的二步验证码。如果你没有后者,忽略它并按下回车。 + +![](https://farm8.staticflickr.com/7525/15761947888_7bc71bf216_o.jpg) + +很明显,你需要一个Evernote账号来完成这些,因此先去注册。 + +一旦完成这一切之后,你就可以开始了,创建新的笔记并编辑它们。 + +但是首先,你需要设置你最喜欢的文本编辑器: + + $ geeknote settings --editor vim + +接着,常规创建一条新笔记的语法是: + + $ geeknote create --title [title of the new note] (--content [content] --tags [comma-separated tags] --notebook [comma-separated notebooks]) + +上面的命令中,只有‘title’是必须的,它会与一条新笔记的标题相关联。其他的标注可以为笔记添加额外的元数据:添加标签来与你的笔记关联、指定放在那个笔记本里。同样,如果你的标题或者内容还有空格,不要忘记将它们放在引号中。 + + +比如: + + $ geeknote create --title "My note" --content "This is a test note" --tags "finance, business, important" --notebook "Family" + +通常上,下一步就是编辑你的笔记。语法很相似: + + $ geeknote edit --note [title of the note to edit] (--title [new title] --tags [new tags] --notebook [new notebooks]) + +注意可选的参数如标题、标签和笔记本,用来修改笔记的元数据。比如,你可以用下面的命令重命名笔记: + + $ geeknote edit --note [old title] --title [new title] + +现在基本的创建和编辑已经完成了,更高级的特性是搜索和删除。你可以下面的语法搜索你的笔记: + + $ geeknote find --search [text-to-search] --tags [comma-separated tags] --notebook [comma-separated notebooks] --date [date-or-date-range] --content-search + +默认上,上面的命令会通过标题搜索笔记。 用"--content-search"选项,就可以搜索它们的内容。 + +比如: + + $ geeknote find --search "*restaurant" --notebooks "Family" --date 31.03.2014-31.08.2014 + +显示制定标题的笔记: + + $ geeknote show [title] + +![](https://farm8.staticflickr.com/7538/15327089024_32867cded6_o.jpg) + +我最喜欢使用的一个技巧是使用: + + $ geeknote show "*" + +这会显示所有的笔记并允许你在这中选择一个。 + +删除一条笔记: + + $ geeknote remove --note [title] + +小心这是真正的删除。它会从云存储中删除这条笔记。 + +最后有很多的选项来管理标签和笔记本。我想最有用的是显示笔记本列表。 + + $ geeknote notebook-list + +![](https://farm8.staticflickr.com/7472/15762063420_43e3ee17da_o.jpg) + +下面的非常相像。你可以猜到,可以用下面的命令列出所有的标签: + + $ geeknote tag-list + +创建一个笔记本: + + $ geeknote notebook-create --title [notebook title] + +创建一个标签: + + $ geeknote tag-create --title [tag title] + +一旦你了解了窍门,很明显语法是非常连贯且明确的。 + +如果你想要了解更多,不要忘记查看[官方文档][6]。 + +### 福利 ### + +As a bonus, Geeknote comes with the utility gnsync, which allows for file synchronization between your Evernote account and your local computer. However, I find its syntax a bit dry: +福利的是,Geeknote自带的gnsync工具可以让你在Evernote和本地计算机之间同步。然而,我发现它的语法有点枯燥: + + $ gnsync --path [where to sync] (--mask [what kind of file to sync] --format [in which format] --logpath [where to write the log] --notebook [which notebook to use]) + +下面是这些的意义。 + + +- **--path /home/adrien/Documents/notes/**: 与Evernote同步笔记的位置。 +- **--mask "*.txt"**: 只同步纯文本文件。默认上,gnsync会尝试同步所有文件。 +- **--format markdown**: 你希望它们是纯文本或者markdown格式(默认是纯文本)。 +- **--logpath /home/adrien/gnsync.log**: 同步日志的位置。为防出错,gnsync会在那里写入日志信息。 +- **--notebook "Family"**: 同步哪个笔记本中的笔记。如果你那里留空,程序会创建一个以你同步文件夹命令的笔记本。 + +总结来说,Geeknote是一款花哨的Evernote的命令行客户端。我个人不常使用Evernote,但它仍然很漂亮和有用。命令行一方面让它变得很极客且很容易与shell脚本结合。同样,还有Git上fork出来的Geeknote,在ArchLinux AUR上称为[geeknote-improved-git][7],貌似它有更多的特性和比其他分支更积极的开发。但在我看来,还很值得再看看。 + +你认为Geeknote怎么样? 有什么你想用的么?或者你更喜欢使用传统的程序?在评论区中让我们知道。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/evernote-command-line-linux.html + +作者:[Adrien Brochard][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://xmodulo.com/manage-personal-expenses-command-line.html +[2]:https://evernote.com/ +[3]:http://xmodulo.com/go/android_tutorial +[4]:http://www.geeknote.me/ +[5]:https://aur.archlinux.org/packages/geeknote-git/ +[6]:http://www.geeknote.me/documentation/ +[7]:https://aur.archlinux.org/packages/geeknote-improved-git/ \ No newline at end of file