mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
ee3dba9d7b
@ -1,31 +1,31 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13003-1.html)
|
||||
[#]: subject: (Resize images using Python)
|
||||
[#]: via: (https://opensource.com/life/15/2/resize-images-python)
|
||||
[#]: author: (Dayo Ntwari https://opensource.com/users/dayontwari)
|
||||
|
||||
使用 Python 调整图像大小
|
||||
======
|
||||
快速解释如何在 Python 中调整图像大小,同时保持相同的长宽比。
|
||||
|
||||
> 快速解释如何在 Python 中调整图像大小,同时保持相同的长宽比。
|
||||
|
||||
![Python in a tree][1]
|
||||
|
||||
我喜欢 [Python][2],而且我已经学了一段时间了。前段时间,我写了一个 Python 脚本,在这个脚本中,我需要调整一堆图片的大小,同时保持长宽比(比例)不变。于是我四处寻找,发现了 [Pillow][3],这是一个 Python 图像库,也是一个叫做 PIL 的旧库的”友好分叉“。
|
||||
我喜欢 [Python][2],而且我已经学了一段时间了。前段时间,我写了一个 Python 脚本,在这个脚本中,我需要调整一堆图片的大小,同时保持长宽比(比例)不变。于是我四处寻找,发现了 [Pillow][3],这是一个 Python 图像库,也是一个叫做 PIL 的旧库的“友好复刻”。
|
||||
|
||||
要安装 Pillow,请使用 Python 的 `pip` 模块:
|
||||
|
||||
|
||||
```
|
||||
`$ python3 -m pip install Pillow`
|
||||
$ python3 -m pip install Pillow
|
||||
```
|
||||
|
||||
### 按宽度缩放
|
||||
|
||||
这是一个使用 Pillow 模块来调整图片大小的基本脚本:
|
||||
|
||||
|
||||
```
|
||||
from PIL import Image
|
||||
|
||||
@ -37,15 +37,14 @@ img = img.resize((basewidth, hsize), Image.ANTIALIAS)
|
||||
img.save('resized_image.jpg')
|
||||
```
|
||||
|
||||
这几行 Python 代码使用 Pillow 将一张图片 (**fullsized_image.jpg**) 调整为 300 像素的宽度,宽度在变量 **basewidth** 中设置,高度则与新的宽度成比例。比例高度的计算方法是:确定 300 像素占原宽度 (**img.size[0]**) 的百分比,然后将原高度 (**img.size[1]**) 乘以该百分比。所得的高度值保存在变量 **hsize** 中。
|
||||
这几行 Python 代码使用 Pillow 将一张图片 (`fullsized_image.jpg`) 调整为 300 像素的宽度,宽度在变量 `basewidth` 中设置,高度则与新的宽度成比例。比例高度的计算方法是:确定 300 像素占原宽度 (`img.size[0]`) 的百分比,然后将原高度(`img.size[1]`) 乘以该百分比。所得的高度值保存在变量 `hsize` 中。
|
||||
|
||||
如果你需要不同的图片宽度,你可以将 **basewidth** 改为任何其他数字。另外,请注意,因为我想保留全尺寸的图片 (**fullsized_image.jpg**),因此我将调整后的图片以一个不同的名称 **resized_image.jpg** 保存。当然,你不必这么做。如果你想要这么做,你可以使用相同的文件名将调整后的图片覆盖全尺寸的图片。
|
||||
如果你需要不同的图片宽度,你可以将 `basewidth` 改为任何其他数字。另外,请注意,因为我想保留全尺寸的图片 (`fullsized_image.jpg`),因此我将调整后的图片以一个不同的名称 `resized_image.jpg` 保存。当然,你不必这么做。如果你想,你可以使用相同的文件名将调整后的图片覆盖全尺寸的图片。
|
||||
|
||||
### 按高度缩放
|
||||
|
||||
如果高度是固定的,而宽度是按比例变化的,那也基本差不多,你只需要把东西换一下:
|
||||
|
||||
|
||||
```
|
||||
from PIL import Image
|
||||
|
||||
@ -57,11 +56,8 @@ img = img.resize((wsize, baseheight), Image.ANTIALIAS)
|
||||
img.save('resized_image.jpg')
|
||||
```
|
||||
|
||||
注意 **basewidth** 现在是 **baseheight**,因为高度是固定的。在第三行中,我们在计算高度百分比,所以我们需要 **img.size[1]** 而不是 **img.size[0]**。size 属性是一个元组,包含宽度和高度,单位是像素,**size[0]** 指的是第一个元组元素,也就是宽度,**size[1]** 是第二个元素,也就是高度。第 4 行也有这样的切换,**size[0]** 代表宽度,**size[1]** 代表高度。
|
||||
注意 `basewidth` 现在换成了 `baseheight`,因为高度是固定的。在第三行中,我们在计算高度百分比,所以我们需要 `img.size[1]` 而不是 `img.size[0]`。`size` 属性是一个元组,包含宽度和高度,单位是像素,`size[0]` 指的是第一个元组元素,也就是宽度,`size[1]` 是第二个元素,也就是高度。第 4 行也有这样的切换,`size[0]` 代表宽度,`size[1]` 代表高度。
|
||||
|
||||
_最初发表在 Dayo Ntwari 的[博客][4]上,经允许后在 Creative Commons 许可下转载。_
|
||||
|
||||
_本文由编辑于 2021 年 1 月更新。_
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -70,7 +66,7 @@ via: https://opensource.com/life/15/2/resize-images-python
|
||||
作者:[Dayo Ntwari][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,223 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Search, Study And Practice Linux Commands On The Fly!)
|
||||
[#]: via: (https://www.ostechnix.com/search-study-and-practice-linux-commands-on-the-fly/)
|
||||
[#]: author: (SK https://www.ostechnix.com/author/sk/)
|
||||
|
||||
Search, Study And Practice Linux Commands On The Fly!
|
||||
======
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2019/01/tldr-720x340.png)
|
||||
|
||||
The title may look like sketchy and click bait. Allow me to explain what I am about to explain in this tutorial. Let us say you want to download an archive file, extract it and move the file from one location to another from command line. As per the above scenario, we may need at least three Linux commands, one for downloading the file, one for extracting the downloaded file and one for moving the file. If you’re intermediate or advanced Linux user, you could do this easily with an one-liner command or a script in few seconds/minutes. But, if you are a noob who don’t know much about Linux commands, you might need little help.
|
||||
|
||||
Of course, a quick google search may yield many results. Or, you could use [**man pages**][1]. But some man pages are really long, comprehensive and lack in useful example. You might need to scroll down for quite a long time when you’re looking for a particular information on the specific flags/options. Thankfully, there are some [**good alternatives to man pages**][2], which are focused on mostly practical commands. One such good alternative is **TLDR pages**. Using TLDR pages, we can quickly and easily learn a Linux command with practical examples. To access the TLDR pages, we require a TLDR client. There are many clients available. Today, we are going to learn about one such client named **“Tldr++”**.
|
||||
|
||||
Tldr++ is a fast and interactive tldr client written with **Go** programming language. Unlike the other Tldr clients, it is fully interactive. That means, you can pick a command, read all examples , and immediately run any command without having to retype or copy/paste each command in the Terminal. Still don’t get it? No problem. Read on to learn and practice Linux commands on the fly.
|
||||
|
||||
### Install Tldr++
|
||||
|
||||
Installing Tldr++ is very simple. Download tldr++ latest version from the [**releases page**][3]. Extract it and move the tldr++ binary to your $PATH.
|
||||
|
||||
```
|
||||
$ wget https://github.com/isacikgoz/tldr/releases/download/v0.5.0/tldr_0.5.0_linux_amd64.tar.gz
|
||||
|
||||
$ tar xzf tldr_0.5.0_linux_amd64.tar.gz
|
||||
|
||||
$ sudo mv tldr /usr/local/bin
|
||||
|
||||
$ sudo chmod +x /usr/local/bin/tldr
|
||||
```
|
||||
|
||||
Now, run ‘tldr’ binary to populate the tldr pages in your local system.
|
||||
|
||||
```
|
||||
$ tldr
|
||||
```
|
||||
|
||||
Sample output:
|
||||
|
||||
```
|
||||
Enumerating objects: 6, done.
|
||||
Counting objects: 100% (6/6), done.
|
||||
Compressing objects: 100% (6/6), done.
|
||||
Total 18157 (delta 0), reused 3 (delta 0), pack-reused 18151
|
||||
Successfully cloned into: /home/sk/.local/share/tldr
|
||||
```
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2019/01/tldr-2.png)
|
||||
|
||||
Tldr++ is available in AUR. If you’re on Arch Linux, you can install it using any AUR helper, for example [**YaY**][4]. Make sure you have removed any existing tldr client from your system and run the following command to install tldr++.
|
||||
|
||||
```
|
||||
$ yay -S tldr++
|
||||
```
|
||||
|
||||
Alternatively, you can build from source as described below. Since Tldr++ is written using Go language, make sure you have installed it on your Linux box. If it isn’t installed yet, refer the following guide.
|
||||
|
||||
+ [How To Install Go Language In Linux](https://www.ostechnix.com/install-go-language-linux/)
|
||||
|
||||
After installing Go, run the following command to install Tldr++.
|
||||
|
||||
```
|
||||
$ go get -u github.com/isacikgoz/tldr
|
||||
```
|
||||
|
||||
This command will download the contents of tldr repository in a folder named **‘go’** in the current working directory.
|
||||
|
||||
Now run the ‘tldr’ binary to populate all tldr pages in your local system using command:
|
||||
|
||||
```
|
||||
$ go/bin/tldr
|
||||
```
|
||||
|
||||
Sample output:
|
||||
|
||||
![][6]
|
||||
|
||||
Finally, copy the tldr binary to your PATH.
|
||||
|
||||
```
|
||||
$ sudo mv tldr /usr/local/bin
|
||||
```
|
||||
|
||||
It is time to see some examples.
|
||||
|
||||
### Tldr++ Usage
|
||||
|
||||
Type ‘tldr’ command without any options to display all command examples in alphabetical order.
|
||||
|
||||
![][7]
|
||||
|
||||
Use the **UP/DOWN arrows** to navigate through the commands, type any letters to search or type a command name to view the examples of that respective command. Press **?** for more and **Ctrl+c** to return/exit.
|
||||
|
||||
To display the example commands of a specific command, for example **apt** , simply do:
|
||||
|
||||
```
|
||||
$ tldr apt
|
||||
```
|
||||
|
||||
![][8]
|
||||
|
||||
Choose any example command from the list and hit ENTER. You will see a *** symbol** before the selected command. For example, I choose the first command i.e ‘sudo apt update’. Now, it will ask you whether to continue or not. If the command is correct, just type ‘y’ to continue and type your sudo password to run the selected command.
|
||||
|
||||
![][9]
|
||||
|
||||
See? You don’t need to copy/paste or type the actual command in the Terminal. Just choose it from the list and run on the fly!
|
||||
|
||||
There are hundreds of Linux command examples are available in Tldr pages. You can choose one or two commands per day and learn them thoroughly. And keep this practice everyday to learn as much as you can.
|
||||
|
||||
### Learn And Practice Linux Commands On The Fly Using Tldr++
|
||||
|
||||
Now think of the scenario that I mentioned in the first paragraph. You want to download a file, extract it and move it to different location and make it executable. Let us see how to do it interactively using Tldr++ client.
|
||||
|
||||
**Step 1 – Download a file from Internet**
|
||||
|
||||
To download a file from command line, we mostly use **‘curl’** or **‘wget’** commands. Let me use ‘wget’ to download the file. To open tldr page of wget command, just run:
|
||||
|
||||
```
|
||||
$ tldr wget
|
||||
```
|
||||
|
||||
Here is the examples of wget command.
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2019/01/wget-tldr.png)
|
||||
|
||||
You can use **UP/DOWN** arrows to go through the list of commands. Once you choose the command of your choice, press ENTER. Here I chose the first command.
|
||||
|
||||
Now, enter the path of the file to download.
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2019/01/tldr-3.png)
|
||||
|
||||
You will then be asked to confirm if it is the correct command or not. If the command is correct, simply type ‘yes’ or ‘y’ to start downloading the file.
|
||||
|
||||
![][10]
|
||||
|
||||
We have downloaded the file. Let us go ahead and extract this file.
|
||||
|
||||
**Step 2 – Extract downloaded archive**
|
||||
|
||||
We downloaded the **tar.gz** file. So I am going to open the ‘tar’ tldr page.
|
||||
|
||||
```
|
||||
$ tldr tar
|
||||
```
|
||||
|
||||
You will see the list of example commands. Go through the examples and find which command is suitable to extract tar.gz(gzipped archive) file and hit ENTER key. In our case, it is the third command.
|
||||
|
||||
![][11]
|
||||
|
||||
Now, you will be prompted to enter the path of the tar.gz file. Just type the path and hit ENTER key. Tldr++ supports smart file suggestions. That means it will suggest the file name automatically as you type. Just press TAB key for auto-completion.
|
||||
|
||||
![][12]
|
||||
|
||||
If you downloaded the file to some other location, just type the full path, for example **/home/sk/Downloads/tldr_0.5.0_linux_amd64.tar.gz.**
|
||||
|
||||
Once you enter the path of the file to extract, press ENTER and then, type ‘y’ to confirm.
|
||||
|
||||
![][13]
|
||||
|
||||
**Step 3 – Move file from one location to another**
|
||||
|
||||
We extracted the archive. Now we need to move the file to another location. To move the files from one location to another, we use ‘mv’ command. So, let me open the tldr page for mv command.
|
||||
|
||||
```
|
||||
$ tldr mv
|
||||
```
|
||||
|
||||
Choose the correct command to move the files from one location to another. In our case, the first command will work, so let me choose it.
|
||||
|
||||
![][14]
|
||||
|
||||
Type the path of the file that you want to move and enter the destination path and hit ENTER key.
|
||||
|
||||
![][15]
|
||||
|
||||
**Note:** Type **y!** or **yes!** to run command with **sudo** privileges.
|
||||
|
||||
As you see in the above screenshot, I moved the file named **‘tldr’** to **‘/usr/local/bin/’** location.
|
||||
|
||||
For more details, refer the project’s GitHub page given at the end.
|
||||
|
||||
|
||||
### Conclusion
|
||||
|
||||
Don’t get me wrong. **Man pages are great!** There is no doubt about it. But, as I already said, many man pages are comprehensive and doesn’t have useful examples. There is no way I could memorize all lengthy commands with tricky flags. Some times I spent much time on man pages and remained clueless. The Tldr pages helped me to find what I need within few minutes. Also, we use some commands once in a while and then we forget them completely. Tldr pages on the other hand actually helps when it comes to using commands we rarely use. Tldr++ client makes this task much easier with smart user interaction. Give it a go and let us know what you think about this tool in the comment section below.
|
||||
|
||||
And, that’s all. More good stuffs to come. Stay tuned!
|
||||
|
||||
Good luck!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/search-study-and-practice-linux-commands-on-the-fly/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/learn-use-man-pages-efficiently/
|
||||
[2]: https://www.ostechnix.com/3-good-alternatives-man-pages-every-linux-user-know/
|
||||
[3]: https://github.com/isacikgoz/tldr/releases
|
||||
[4]: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/
|
||||
[5]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[6]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-1.png
|
||||
[7]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-11.png
|
||||
[8]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-12.png
|
||||
[9]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-13.png
|
||||
[10]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-4.png
|
||||
[11]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-6.png
|
||||
[12]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-7.png
|
||||
[13]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-8.png
|
||||
[14]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-9.png
|
||||
[15]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-10.png
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (MjSeven)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,94 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (My 3 favorite open source productivity apps)
|
||||
[#]: via: (https://opensource.com/article/21/1/open-source-productivity-apps)
|
||||
[#]: author: (Taz Brown https://opensource.com/users/heronthecli)
|
||||
|
||||
My 3 favorite open source productivity apps
|
||||
======
|
||||
Streamline your agile workflow and increase your productivity.
|
||||
![Working on a team, busy worklife][1]
|
||||
|
||||
Productivity apps can really make your workflow much easier. In this article, I'll share a few of the open source applications I have used to streamline my workflow and increase my overall productivity. All of the productivity applications in this article are free Linux productivity applications.
|
||||
|
||||
### Tomboy/Gnote
|
||||
|
||||
[Tomboy][2] is a simple note-taking application that can be used on Linux, Windows, and macOS. It's open source under the GNU LGPLv2.
|
||||
|
||||
Tomboy is pretty straightforward to use. You write a note, choose whether to make it sticky on your desktop, and delete it when you're done with it.
|
||||
|
||||
![Tomboy and Gnote][3]
|
||||
|
||||
(Tonya "Taz" Brown, [CC BY-SA 4.0][4])
|
||||
|
||||
It (and its clone [Gnote][5]) is a great little application for taking quick notes. Very often, when I am in the middle of doing something, I come up with ideas or thoughts that I want to recall. Tomboy lets me quickly create a note and jot my thoughts down before I forget them. Then I can transfer those ideas to a more permanent place.
|
||||
|
||||
### Joplin
|
||||
|
||||
[Joplin][6] is an open source note-taking and to-do application. It's cross-platform, available on Linux, Windows, macOS, iOS, and Android, and open source under the MIT License.
|
||||
|
||||
![Joplin][7]
|
||||
|
||||
(Screenshot of [Joplin repository][8] by Tonya "Taz" Brown, [CC BY-SA 4.0][4])
|
||||
|
||||
It can synchronize using cloud syncing services such as Dropbox, OneDrive, Nextcloud, and more. It's easy to install and probably in your Linux repository. It's really two applications in one when you install it on the desktop: You get a standard graphical user interface (GUI) or can open a terminal and use Joplin there.
|
||||
|
||||
The desktop has a really nice interface. Notes are organized in notebooks, which essentially makes them your man page. And because the notes are in Markdown format, they show up rendered, and you can edit them in real time. I enjoy using Markdown because it makes it fast for me to write notes. You can also export or import Joplin notes.
|
||||
|
||||
### Evolution
|
||||
|
||||
[Evolution][9] is an open source personal information management app that's very similar to Outlook, but I think is better for my use. It has email, jobs, notes, links, calendar, and address book functionality. It's open source under the LGPL and other [licenses][10].
|
||||
|
||||
![GNOME Evolution][11]
|
||||
|
||||
([GNOME][12], [CC BY-SA 4.0][4])
|
||||
|
||||
I use it on my desktop computer running Fedora. It is efficient and definitely helps me get through a busy day. It allows me to do business using Linux; what more can I ask?
|
||||
|
||||
To use it in Fedora, open a terminal and type the following commands:
|
||||
|
||||
|
||||
```
|
||||
sudo dnf remove evolution
|
||||
sudo dnf update
|
||||
sudo dnf install evolution
|
||||
sudo dnf install evolution-ews
|
||||
```
|
||||
|
||||
### My go-to tools
|
||||
|
||||
These tools are my staples that I have been relying on for some time. Using them beyond their basic capabilities makes me more efficient, effective, and productive. As a technical product manager and agilist, I am proud that I still use Linux and other open source software, even if the companies I work for do not.
|
||||
|
||||
* * *
|
||||
|
||||
_This article originally appeared on [Course Hero][13] and is republished with permission._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/open-source-productivity-apps
|
||||
|
||||
作者:[Taz Brown][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者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/heronthecli
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_dev_email_chat_video_work_wfm_desk_520.png?itok=6YtME4Hj (Working on a team, busy worklife)
|
||||
[2]: https://wiki.gnome.org/Apps/Tomboy
|
||||
[3]: https://opensource.com/sites/default/files/uploads/tomboy-gnote.png (Tomboy and Gnote)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://wiki.gnome.org/Apps/Gnote
|
||||
[6]: https://joplinapp.org/
|
||||
[7]: https://opensource.com/sites/default/files/uploads/joplin_0.jpg (Joplin)
|
||||
[8]: https://github.com/laurent22/joplin
|
||||
[9]: https://wiki.gnome.org/Apps/Evolution
|
||||
[10]: https://gitlab.gnome.org/GNOME/evolution/-/blob/master/COPYING
|
||||
[11]: https://opensource.com/sites/default/files/uploads/evolution.png (GNOME Evolution)
|
||||
[12]: https://help.gnome.org/users/evolution/stable/intro-main-window.html.en
|
||||
[13]: https://www.coursehero.com/file/74086904/Personal-productivity-using-open-source-software-tools/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,68 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (7 Bash tutorials to enhance your command line skills in 2021)
|
||||
[#]: via: (https://opensource.com/article/21/1/bash)
|
||||
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
|
||||
|
||||
7 Bash tutorials to enhance your command line skills in 2021
|
||||
======
|
||||
Bash is the default command line shell on most Linux systems. So why not
|
||||
learn how to get the most out of it?
|
||||
![Terminal command prompt on orange background][1]
|
||||
|
||||
Bash is the default command line shell on most Linux systems. So why not learn how to get the most out of it? This year, Opensource.com featured many great articles to help you leverage the power of the Bash shell. These are some of the most-read articles about Bash:
|
||||
|
||||
## [Read and write data from anywhere with redirection in the Linux terminal][2]
|
||||
|
||||
Redirection of input and output is a natural function of any programming or scripting language. Technically, it happens inherently whenever you interact with a computer. Input gets read from stdin (standard input, usually your keyboard or mouse), output goes to stdout (standard output, a text or data stream), and errors get sent to stderr. Understanding that these data streams exist enables you to control where information goes when you're using a shell such as Bash. Seth Kenlon shared these great tips to get data from one place to another without a lot of mouse moving and key pressing. You may not use redirection often, but learning to use it can save you a lot of time needlessly opening files and copying and pasting data.
|
||||
|
||||
## [Get started with Bash scripting for sysadmins][3]
|
||||
|
||||
Bash is free and open source software, so anyone can install it, whether they run Linux, BSD, OpenIndiana, Windows, or macOS. Seth Kenlon helps you learn the commands and features that make Bash one of the most powerful shells available.
|
||||
|
||||
## [Try this Bash script for large filesystems][4]
|
||||
|
||||
Have you ever wanted to list all the files in a directory, but just the files, nothing else? How about only the directories? If you have, then Nick Clifton's article might be just what you're looking for. Nick shares a nifty Bash script that can list directories, files, links, or executables. The script works by using the **find** command to do the searching, and then it runs **ls** to show details. It's a clever solution for anyone managing a large Linux system.
|
||||
|
||||
## [Screenshot your Linux system configuration with Bash tools][5]
|
||||
|
||||
There are many reasons you might want to share your Linux configuration with other people. You might be looking for help troubleshooting a problem on your system, or maybe you're so proud of the environment you've created that you want to showcase it to fellow open source enthusiasts. Don Watkins shows us screenFetch and Neofetch to capture and share your system configuration.
|
||||
|
||||
## [6 Handy Bash scripts for Git][6]
|
||||
|
||||
Git has become a ubiquitous code management system. Knowing how to manage a Git repository can streamline your development experience. Bob Peterson shares six Bash scripts that will make your life easier when you're working with Git repositories. **gitlog** prints an abbreviated list of current patches against the master version. Variations of the script can show the patch SHA1 IDs or search for a string within a collection of patches.
|
||||
|
||||
## [5 ways to improve your Bash scripts][7]
|
||||
|
||||
A system admin often writes Bash scripts, some short and some quite lengthy, to accomplish various tasks. Alan Formy-Duval explains how you can make your Bash scripts simpler, more robust, and easier to read and debug. We might assume that we need to employ languages, such as Python, C, or Java, for higher functionality, but that's not necessarily true. The Bash scripting language is very powerful. There is a lot to learn to maximize its usefulness.
|
||||
|
||||
## [My favorite Bash hacks][8]
|
||||
|
||||
Katie McLaughlin helps you improve your productivity with aliases and other shortcuts for the things you forget too often. When you work with computers all day, it's fantastic to find repeatable commands and tag them for easy use later on. Katie's summary of useful Bash features and helper commands to save you time.
|
||||
|
||||
These Bash tips take an already powerful shell to a whole new level of usefulness. Feel free to share your own tips, too.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/bash
|
||||
|
||||
作者:[Jim Hall][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者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/jim-hall
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
|
||||
[2]: https://opensource.com/article/20/6/redirection-bash
|
||||
[3]: https://opensource.com/article/20/4/bash-sysadmins-ebook
|
||||
[4]: https://opensource.com/article/20/2/script-large-files
|
||||
[5]: https://opensource.com/article/20/1/screenfetch-neofetch
|
||||
[6]: https://opensource.com/article/20/1/bash-scripts-git
|
||||
[7]: https://opensource.com/article/20/1/improve-bash-scripts
|
||||
[8]: https://opensource.com/article/20/1/bash-scripts-aliases
|
232
sources/tech/20210111 Deploy Ceph in a Raspberry Pi cluster.md
Normal file
232
sources/tech/20210111 Deploy Ceph in a Raspberry Pi cluster.md
Normal file
@ -0,0 +1,232 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Deploy Ceph in a Raspberry Pi cluster)
|
||||
[#]: via: (https://opensource.com/article/21/1/ceph-raspberry-pi)
|
||||
[#]: author: (AJ Canlas https://opensource.com/users/ajscanlas)
|
||||
|
||||
Deploy Ceph in a Raspberry Pi cluster
|
||||
======
|
||||
Install Ceph storage using ceph-ansible and deploy it in a Raspberry Pi
|
||||
cluster.
|
||||
![Vector, generic Raspberry Pi board][1]
|
||||
|
||||
[Ceph][2] is an open source software storage platform that provides object, block, and filesystem storage in a unified storage cluster. I first used Ceph when I [integrat][3][ed it with OpenStack][3]. At first, I was confused about why I should use Ceph since storage devices are widely available. But after using it for more than three years, the platform's stability and integrity have proven its value again and again.
|
||||
|
||||
This article will show you how to install Ceph using [ceph-ansible][4] (an officially supported Ansible playbook for Ceph) and deploy it in a Raspberry Pi cluster.
|
||||
|
||||
**Materials:**
|
||||
|
||||
1. Four Raspberry Pi 4B 4GB models
|
||||
2. Four 32GB microSD cards (boot OS)
|
||||
3. Four Raspberry Pi cases with fans and heatsinks (very important)
|
||||
4. Four Raspberry Pi chargers
|
||||
5. Six 32GB USB flash drives (for the Ceph OSD nodes)
|
||||
|
||||
|
||||
|
||||
**Architecture:**
|
||||
|
||||
![Project architecture][5]
|
||||
|
||||
(Aaron John Canlas, [CC BY-SA 4.0][6])
|
||||
|
||||
Regarding the configuration:
|
||||
|
||||
* Both the front-end and back-end networks are in the same subnet
|
||||
* The [Ceph Monitor][7] software uses a Raspberry Pi 4B with 4GB RAM
|
||||
* The [Ceph OSD][8] nodes use the same Raspberry Pi model but with two USB flash drives for the OSD disks
|
||||
|
||||
|
||||
|
||||
### Deploy Ceph using ceph-ansible
|
||||
|
||||
Using Ceph's Ansible repository makes the deployment smooth and simple.
|
||||
|
||||
#### 1\. Copy ssh keys to all servers
|
||||
|
||||
I have a common user called `cephadmin` on all servers (each Raspberry Pi is a server in this context). The `cephadmin` user is configured with passwordless `sudo` to make things easier.
|
||||
|
||||
After generating a key using `ssh-keygen`, deploy all keys using `ssh-copy-id`.
|
||||
|
||||
I use a Bash for-loop because I'm using consistent and incremental hostnames:
|
||||
|
||||
|
||||
```
|
||||
$ for i in {0..3}; \
|
||||
do ssh-copy-id cephadmin@rpi4b4-$i; \
|
||||
done
|
||||
```
|
||||
|
||||
You need to accept and enter your password on each one, but you can automate this with `expect`.
|
||||
|
||||
#### 2\. Clone ceph-ansible and install requirements
|
||||
|
||||
Install Git to clone the repository:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo yum install git -y`
|
||||
```
|
||||
|
||||
Clone the ceph-ansible repository:
|
||||
|
||||
|
||||
```
|
||||
$ git clone <https://github.com/ceph/ceph-ansible.git>
|
||||
$ cd ceph-ansible/
|
||||
```
|
||||
|
||||
I'm using an AArch64 build of CentOS 7, so I must install some required packages before continuing.
|
||||
|
||||
First, Python pip:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo yum install python3-pip -y`
|
||||
```
|
||||
|
||||
Then the packages ceph-ansible needs:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo yum install python3-devel libffi-devel openssl-devel -y`
|
||||
```
|
||||
|
||||
Finally, the requirements `ceph-ansible` needs:
|
||||
|
||||
|
||||
```
|
||||
`$ pip3 install -r requirements.txt --user`
|
||||
```
|
||||
|
||||
I received this error:
|
||||
|
||||
|
||||
```
|
||||
You are linking against OpenSSL 1.0.2, which is no longer supported by the OpenSSL project.
|
||||
To use this version of cryptography you need to upgrade to a newer version of OpenSSL. For
|
||||
this version only you can also set the environment variable
|
||||
CRYPTOGRAPHY_ALLOW_OPENSSL_102 to allow OpenSSL 1.0.2.
|
||||
```
|
||||
|
||||
This may be related to the architecture, because I can't replicate the error in a CentOS 7 virtual machine.
|
||||
|
||||
For deployment, export `CRYPTOGRAPHY_ALLOW_OPENSSL_102` to `True` so that Ansible can run:
|
||||
|
||||
|
||||
```
|
||||
`$ export CRYPTOGRAPHY_ALLOW_OPENSSL_102=True`
|
||||
```
|
||||
|
||||
#### 3\. Configure ceph-ansible for deployment
|
||||
|
||||
Now you're ready to deploy Ceph using ceph-ansible.
|
||||
|
||||
Copy `site.yml.sample` to `site.yml`:
|
||||
|
||||
|
||||
```
|
||||
`$ mv site.yml.sample site.yml`
|
||||
```
|
||||
|
||||
Create `all.yml` in the `group_vars` directory:
|
||||
|
||||
|
||||
```
|
||||
$ cat << EOF >> group_vars/all.yml
|
||||
ceph_origin: repository
|
||||
ceph_repository: community
|
||||
ceph_repository_type: cdn
|
||||
ceph_stable_release: nautilus
|
||||
monitor_interface: wlan0
|
||||
public_network: "192.168.100.0/24"
|
||||
cluster_network: "192.168.100.0/24"
|
||||
dashboard_enabled: false
|
||||
configure_firewall: false
|
||||
EOF
|
||||
```
|
||||
|
||||
Create `osds.yml` in the `group_vars` directory:
|
||||
|
||||
|
||||
```
|
||||
$ cat << EOF >> group_vars/all.yml
|
||||
osd_scenario: collocated
|
||||
devices:
|
||||
- /dev/sda
|
||||
\- /dev/sdb
|
||||
EOF
|
||||
```
|
||||
|
||||
Create an inventory file:
|
||||
|
||||
|
||||
```
|
||||
$ cat << EOF >> inventory
|
||||
[mons]
|
||||
rpi4b4-0
|
||||
|
||||
[osds]
|
||||
rpi4b4-1
|
||||
rpi4b4-2
|
||||
rpi4b4-3
|
||||
EOF
|
||||
```
|
||||
|
||||
As of this writing, there is a bug in the ceph-ansible repository (according to this [bug ticket][9]). You can mitigate the bug by editing line 85 and 86 of the roles:
|
||||
|
||||
|
||||
```
|
||||
- (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_osds"] | int > 0
|
||||
- (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_osds"] == (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_up_osds"]
|
||||
```
|
||||
|
||||
#### 4\. Deploy Ceph
|
||||
|
||||
Run the Ansible playbook with your inventory file:
|
||||
|
||||
|
||||
```
|
||||
`$ ansible-playbook -i inventory site.yml`
|
||||
```
|
||||
|
||||
After 15–20 minutes, you should see this result:
|
||||
|
||||
![Ceph deployment][10]
|
||||
|
||||
(Aaron John Canlas, [CC BY-SA 4.0][6])
|
||||
|
||||
### Next steps
|
||||
|
||||
Previously, I [manually deployed][11] an OpenStack cluster in another Raspberry Pi cluster. I hope to integrate it with this one. I'm also looking into deploying with [TripleO][12].
|
||||
|
||||
The possibilities for Raspberry Pi, Ansible, and OpenStack are endless. Get started with your own experiment, and let me know how it goes in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/ceph-raspberry-pi
|
||||
|
||||
作者:[AJ Canlas][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者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/ajscanlas
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/raspberrypi_board_vector_red.png?itok=yaqYjYqI (Vector, generic Raspberry Pi board)
|
||||
[2]: https://ceph.io/
|
||||
[3]: https://opensource.com/business/15/1/introduction-ceph-storage-openstack
|
||||
[4]: https://docs.ceph.com/projects/ceph-ansible/en/latest/index.html#
|
||||
[5]: https://opensource.com/sites/default/files/uploads/architecture_0_0.png (Project architecture)
|
||||
[6]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[7]: https://docs.ceph.com/en/latest/glossary/#term-Ceph-Monitor
|
||||
[8]: https://docs.ceph.com/en/latest/glossary/#term-OSD
|
||||
[9]: https://tracker.ceph.com/issues/43430
|
||||
[10]: https://opensource.com/sites/default/files/uploads/ceph.png (Ceph deployment)
|
||||
[11]: https://opensource.com/article/20/12/openstack-raspberry-pi
|
||||
[12]: https://wiki.openstack.org/wiki/TripleO
|
@ -0,0 +1,77 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Improve your productivity with this lightweight Linux desktop)
|
||||
[#]: via: (https://opensource.com/article/21/1/elementary-linux)
|
||||
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
|
||||
|
||||
Improve your productivity with this lightweight Linux desktop
|
||||
======
|
||||
ElementaryOS provides a fast, lightweight, and efficient desktop to keep
|
||||
you productive in the new year.
|
||||
![Business woman on laptop sitting in front of window][1]
|
||||
|
||||
In prior years, this annual series covered individual apps. This year, we are looking at all-in-one solutions in addition to strategies to help in 2021. Welcome to day 1 of 21 Days of Productivity in 2021.
|
||||
|
||||
When looking for tools to be more productive, it is easy to cobble together a working collection of applications that almost, but just don't quite, play nice together. In prior years, we have talked about individual email applications, calendaring applications, note-taking applications, and so on. There are always bumps, though—places where it either takes custom scripts or complicated export/import steps to make a tool work.
|
||||
|
||||
[ElementaryOS][2] is a complete desktop with a beautiful, functional, and productive environment.
|
||||
|
||||
![Linux ElementaryOS Desktop][3]
|
||||
|
||||
ElementaryOS desktop (Kevin Sonney, [CC BY-SA 4.0][4])
|
||||
|
||||
ElementaryOS is a pay-what-you-want open source project based on the popular Ubuntu Linux distribution. The initial setup and installation will be very familiar to anyone who has installed Ubuntu in the past. However, once logged in, the experience can be very different.
|
||||
|
||||
ElementaryOS uses the [Gala window manager][5] and the Pantheon shell. Both were developed specifically for Elementary. Once installed, the desktop is very minimal, and it only provides a small number of lightweight apps. These apps include a web browser, terminal, mail client, and calendaring client. It also has an App Center that allows you to install both free and commercial applications curated by the Elementary team.
|
||||
|
||||
![Linux ElementaryOS Mail and calendar][6]
|
||||
|
||||
ElementaryOS mail and calendar (Kevin Sonney, [CC BY-SA 4.0][4])
|
||||
|
||||
The [mail][7] and [calendar][8] apps will look very familiar since both have been used by other distributions for a while now. Mail started as a fork of [Geary][9], and the calendar is known as [Maya][10] other places. Setup is very easy for both. The two apps only authenticate with a username/password by default, so users who require two-factor authentication will need to go through some extra steps. The interface is exceptionally lightweight and fast for both.
|
||||
|
||||
![Linux ElementaryOS app center][11]
|
||||
|
||||
The App Center (Kevin Sonney, [CC BY-SA 4.0][4])
|
||||
|
||||
By default, ElementaryOS does not include a to-do list or note-taking application. This situation is where the App Center comes into play. In the App Center, there is a large selection of applications to fill the gaps. Two of the apps really stand out. The first is [Planner][12], a clean, lightweight to-do list manager. It supports multiple lists, scheduled and recurring tasks, projects, and sub-projects. It can also sync with the popular [Todoist][13] online application, but that isn't required.
|
||||
|
||||
The second app from the App Center is [Notes-Up][14], a note-taking app that uses Markdown for rich text. It allows a user to create multiple notes in multiple notebooks and has both a "View" and "Edit" option so that you can preview how the final document will look. Again, the app is fast, lightweight, and very minimalistic, keeping with the overall ElementaryOS look and feel.
|
||||
|
||||
![ElementaryOS Planner and Notes-up][15]
|
||||
|
||||
Planner and Notes-up (Kevin Sonney, [CC BY-SA 4.0][4])
|
||||
|
||||
If you don't like the default apps, Elementary is based on Ubuntu LTS, so the entire Ubuntu app ecosystem is available if you need to use other applications. Overall, though, the ElementaryOS default provides a fast, lightweight, and efficient desktop to keep you productive in the new year.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/elementary-linux
|
||||
|
||||
作者:[Kevin Sonney][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者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/ksonney
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
|
||||
[2]: https://elementary.io/
|
||||
[3]: https://opensource.com/sites/default/files/pictures/elementaryos-desktop.png (ElementaryOS Desktop)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://github.com/elementary/gala
|
||||
[6]: https://opensource.com/sites/default/files/pictures/elementaryos-mail-calendar.png (Linux ElementaryOS Mail and calendar)
|
||||
[7]: https://github.com/elementary/mail
|
||||
[8]: https://github.com/elementary/calendar
|
||||
[9]: https://wiki.gnome.org/Apps/Geary
|
||||
[10]: https://launchpad.net/maya
|
||||
[11]: https://opensource.com/sites/default/files/pictures/elementaryos-app-center_0.png (Linux ElementaryOS app center)
|
||||
[12]: https://appcenter.elementary.io/com.github.alainm23.planner/
|
||||
[13]: https://todoist.com/
|
||||
[14]: https://github.com/Philip-Scott/Notes-up
|
||||
[15]: https://opensource.com/sites/default/files/pictures/planner-notes-up.png (ElementaryOS Planner and Notes-up)
|
@ -0,0 +1,106 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Super Productivity: A Super Cool Open Source To-Do List App with GitHub Integration)
|
||||
[#]: via: (https://itsfoss.com/super-productivity/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Super Productivity: A Super Cool Open Source To-Do List App with GitHub Integration
|
||||
======
|
||||
|
||||
_**Brief: Super Productivity is an awesome open-source to-do app that helps you manage tasks, track tickets, and manage time.**_
|
||||
|
||||
No matter what you do, improving productivity is a common goal for most of the people. Usually, you would end up trying various [to-do list apps][1] or a [note-taking app][2] to help yourself organize and remind things to efficiently keep up with your work.
|
||||
|
||||
Sure, you can check out those lists and try them as you like. Here, I’ve come across something unique that you also may want to try if you wanted a desktop to-do application with a solid user interface, GitHub/GitLab integration, and a list of essential features.
|
||||
|
||||
Super Productivity seems to be an impressive to-do list app with some unique features to offer. In this article, I’ll let you know all about it briefly.
|
||||
|
||||
### Super Productivity: A Simple & Attractive Open-Source To-do App
|
||||
|
||||
![][3]
|
||||
|
||||
Super Productivity is an open-source app, and it is actively maintained by [Johannes Millan][4] on GitHub.
|
||||
|
||||
To me, the user experience matters the most, and I’m completely impressed with the UI offered by Super Productivity.
|
||||
|
||||
It also offers a bunch of essential features along with some interesting options. Let’s take a look at them.
|
||||
|
||||
### Features of Super Productivity
|
||||
|
||||
![][5]
|
||||
|
||||
* Add to-do tasks, description
|
||||
* Track time spent on tasks and break
|
||||
* Project management (with JIRA, GitHub, and GitLab integration)
|
||||
* Ability to schedule tasks
|
||||
* Language selection option
|
||||
* Sync option to Dropbox, Google Drive, or any other WebDAV storage location
|
||||
* Import/Export functionality
|
||||
* Auto-backup functionality
|
||||
* Ability to tweak the behavior of timers and counters
|
||||
* Dark Mode them available
|
||||
* Add attachment to tasks
|
||||
* Ability to repeat tasks completely for free
|
||||
* Cross-platform support
|
||||
|
||||
|
||||
|
||||
In addition to the features I mentioned, you will find more detailed settings and tweaks to configure.
|
||||
|
||||
Especially, the integration with [JIRA][6], [GitHub][7] and [GitL][8][ab][8]. You can automatically assign tasks to work on without needing to check your email for the recent updates to issue trackers or tickets.
|
||||
|
||||
Compared to many premium to-do web services that I’ve used so far, you will be surprised to find many useful features completely for free. You can also take a look at the video below to get some idea:
|
||||
|
||||
### Installing Super Productivity on Linux
|
||||
|
||||
![][9]
|
||||
|
||||
You get a variety of options to install. I downloaded the AppImage file to test. But, you can also get the deb package for Debian-based distros.
|
||||
|
||||
It is also available as a [snap][10]. You can find all the packages in the [GitHub releases section][11].
|
||||
|
||||
If you’re curious, you can check out its [GitHub page][12] to know more about it.
|
||||
|
||||
Download Super Productivity
|
||||
|
||||
### Concluding Thoughts
|
||||
|
||||
I found the user experience fantastic with Super Productivity. The features offered are incredibly useful and considering that you get some premium functionalities (that you’d get normally with to-do web services) it could be a perfect replacement for most of the users.
|
||||
|
||||
You can simply sync the data using Google Drive, Dropbox, or any other WebDAV storage location.
|
||||
|
||||
It could also replace a service like [ActivityWatch][13] to help you track the time you work on your tasks and remain idle. So, it could be your all-in-one solution for improving productivity!
|
||||
|
||||
Sounds exciting, right?
|
||||
|
||||
What do you think about Super Productivity? Let me know your thoughts in the comments section below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/super-productivity/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/to-do-list-apps-linux/
|
||||
[2]: https://itsfoss.com/note-taking-apps-linux/
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/super-productivity.jpg?resize=800%2C569&ssl=1
|
||||
[4]: https://github.com/johannesjo
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/super-productivity-2.jpg?resize=800%2C575&ssl=1
|
||||
[6]: https://www.atlassian.com/software/jira
|
||||
[7]: https://github.com/
|
||||
[8]: https://about.gitlab.com
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/super-productivity-1.jpg?resize=800%2C574&ssl=1
|
||||
[10]: https://snapcraft.io/superproductivity
|
||||
[11]: https://github.com/johannesjo/super-productivity/releases
|
||||
[12]: https://github.com/johannesjo/super-productivity
|
||||
[13]: https://itsfoss.com/activitywatch/
|
@ -0,0 +1,223 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (qfzy1233)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Search, Study And Practice Linux Commands On The Fly!)
|
||||
[#]: via: (https://www.ostechnix.com/search-study-and-practice-linux-commands-on-the-fly/)
|
||||
[#]: author: (SK https://www.ostechnix.com/author/sk/)
|
||||
|
||||
光速!搜索,学习和实践Linux命令!!
|
||||
======
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2019/01/tldr-720x340.png)
|
||||
|
||||
这一标题可能看起来很粗略且吸睛。请允许我解释一下我在本教程中将要阐释的内容。假设你想下载一个压缩文件,将其解压缩,并从命令行中将文件从一个位置移动到另一个位置。根据上面的场景,我们可能需要至少三个Linux命令,一个用于下载文件,一个用于提取下载的文件,一个用于移动文件。如果你是中级或高级Linux用户,你可以通过一行命令或脚本在几秒钟/分钟内轻松完成这一任务。但是,如果你是一个不懂得太多 Linux 命令的菜鸟你可能就需要一些帮助了。
|
||||
|
||||
当然,谷歌的快速搜索可能会找到很多结果。或者,你可以使用[**man 命令手册**][1]。但是有些手册页实在很长,很全面,但缺少有用的示例。当你在特定的标志/选项上寻找特定的信息时,你可能需要向下检索相当长的时间。值得庆幸的是,有一些[**man 手册更好的替代品**][2],它们主要关注于实用的命令。一个很好的选择是**TLDR pages**。使用TLDR手册,我们可以通过实际示例快速轻松地学习一个Linux命令。要使用 TLDR 手册,我们需要 TLDR 客户端。有很多客户。今天我们就来了解一个这样的客户端,名为 **“Tldr++”**。
|
||||
|
||||
Tldr++ 是一个快速和交互式的 Tldr 客户端,用**Go**编程语言编写。与其他 Tldr 客户端不同,它是完全交互式的。这意味着,你可以选择一个命令,读取所有示例,并立即运行任何命令,而不必在终端中重新键入或复制/粘贴每个命令。还是不明白?没有问题。请继续阅读,以便动态学习和实践Linux命令。
|
||||
|
||||
### 安装 Tldr++
|
||||
|
||||
安装Tldr++非常简单。从[**版本页面**][3]下载tldr++最新版本。解压它并将tldr++二进制文件移动到你的$PATH中。
|
||||
|
||||
```
|
||||
$ wget https://github.com/isacikgoz/tldr/releases/download/v0.5.0/tldr_0.5.0_linux_amd64.tar.gz
|
||||
|
||||
$ tar xzf tldr_0.5.0_linux_amd64.tar.gz
|
||||
|
||||
$ sudo mv tldr /usr/local/bin
|
||||
|
||||
$ sudo chmod +x /usr/local/bin/tldr
|
||||
```
|
||||
|
||||
现在,运行' tldr '二进制代码将 tldr 手册部署到本地系统中。
|
||||
|
||||
```
|
||||
$ tldr
|
||||
```
|
||||
|
||||
示例输出:
|
||||
|
||||
```
|
||||
Enumerating objects: 6, done.
|
||||
Counting objects: 100% (6/6), done.
|
||||
Compressing objects: 100% (6/6), done.
|
||||
Total 18157 (delta 0), reused 3 (delta 0), pack-reused 18151
|
||||
Successfully cloned into: /home/sk/.local/share/tldr
|
||||
```
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2019/01/tldr-2.png)
|
||||
|
||||
Tldr++ 可以在 AUR 中使用。如果你使用 Arch Linux 上,你可以使用任何 AUR 助手来安装它,例如[**YaY**][4]。确保你已经从系统中删除了任何现有的 tldr 客户端,并运行以下命令安装 tldr++。
|
||||
|
||||
```
|
||||
$ yay -S tldr++
|
||||
```
|
||||
|
||||
或者,你也可以像下面描述的那样从源代码进行编译。因为 Tldr++ 是用 Go 语言编写的,所以请确保你 Linux 系统中已经安装了 Go 语言。如果还没有安装,请参考下面的指南。
|
||||
|
||||
+ 如何在 Linux 系统中安装 Go 语言](https://www.ostechnix.com/install-go-language-linux/)
|
||||
|
||||
在安装好 Go 语言之后, 运行以下的命令来安装 Tldr++.
|
||||
|
||||
```
|
||||
$ go get -u github.com/isacikgoz/tldr
|
||||
```
|
||||
|
||||
该命令在当前工作目录中名下载tldr代码库中的内容并存储到 **‘go’** 文件夹中。
|
||||
|
||||
现在,运行' tldr '二进制代码将 tldr 手册部署到本地系统中。
|
||||
|
||||
```
|
||||
$ go/bin/tldr
|
||||
```
|
||||
|
||||
示例输出:
|
||||
|
||||
![][6]
|
||||
|
||||
最后,将 tldr 二进制文件复制到你的路径中。
|
||||
|
||||
```
|
||||
$ sudo mv tldr /usr/local/bin
|
||||
```
|
||||
|
||||
现在是时候看一些例子了。
|
||||
|
||||
### Tldr++ 用法
|
||||
|
||||
输入不带任何选项的' tldr '命令,以字母顺序显示所有命令示例。
|
||||
|
||||
![][7]
|
||||
|
||||
使用**向上/向下箭头**来浏览命令,键入任何字母来搜索或键入命令名称来查看相应命令的示例。 **?** 以浏览更多消息,按 **Ctrl+c**返回/退出。
|
||||
|
||||
要显示特定命令的示例命令,例如**apt**,可以这样做:
|
||||
|
||||
```
|
||||
$ tldr apt
|
||||
```
|
||||
|
||||
![][8]
|
||||
|
||||
从列表中选择任意示例命令并按ENTER。在选定的命令前会看到一个**符号**。例如,我选择第一个命令即‘sudo apt update’。现在,它会问你是否继续。如果命令正确,只需键入‘y’ 继续,并输入 sudo 密码运行所选命令。
|
||||
|
||||
![][9]
|
||||
|
||||
看到了吗?你不需要在终端中复制/粘贴或键入实际的命令。只需从列表中选择它,并极速运行!
|
||||
|
||||
Tldr 手册中有数百个 Linux 命令示例。你可以每天选择一个或两个命令,并彻底学习它们。每天坚持这样的练习,尽可能多的掌握。
|
||||
|
||||
### 使用 Tldr++ 动态学习和实践 Linux 命令
|
||||
|
||||
现在回到我在第一段中提到的场景。你需要下载一个文件,将其解压缩并将其移动到不同的位置,并使其可执行。让我们看看如何使用 Tldr++ 客户端进行交互。
|
||||
|
||||
**第一步 – 从网上下载文件**
|
||||
|
||||
要使用命令行下载文件,我们主要使用 **‘curl’** or **‘wget’** 命令。让我使用 ‘wget’ 下载文件。要打开 wget 命令的 tldr 页面,只需执行以下命令:
|
||||
|
||||
```
|
||||
$ tldr wget
|
||||
```
|
||||
|
||||
下面是wget命令的示例。
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2019/01/wget-tldr.png)
|
||||
|
||||
你可以使用**向上/向下**箭头来浏览命令列表。一旦你选择了你所选择的命令,按ENTER键。这里我选择了第一个命令。
|
||||
|
||||
现在,输入路径来下载文件。
|
||||
|
||||
![](https://www.ostechnix.com/wp-content/uploads/2019/01/tldr-3.png)
|
||||
|
||||
然后将要求你确认该命令是否正确。如果命令正确,只需键入' yes '或' y '就可以开始下载文件。
|
||||
|
||||
![][10]
|
||||
|
||||
我们已经下载了文件。让我们继续解压这个文件。
|
||||
|
||||
**第二部 – 解压已下载的文件**
|
||||
|
||||
我们下载了 **tar.gz** 文件。所以我将打开 tldr 手册的‘tar’ 页面。
|
||||
|
||||
```
|
||||
$ tldr tar
|
||||
```
|
||||
|
||||
你将看到示例命令列表。浏览这些示例,找出哪个命令适合提取tar.gz(gzip格式)文件,按回车键。在我们的例子中,它是第三个命令。
|
||||
|
||||
![][11]
|
||||
|
||||
现在,系统将提示你输入 tar.gz 文件的路径。只需输入路径并按回车键。Tldr++ 支持智能文件提示。这意味着它会在你键入时自动补全文件名。只需按TAB键自动完成。
|
||||
|
||||
![][12]
|
||||
|
||||
如果将文件下载到其他位置,只需键入完整路径,例如 **/home/sk/Downloads/tldr_0.5.0_linux_amd64.tar.gz.**
|
||||
|
||||
输入要解压的文件的路径后,按 Enter,然后输入' y '进行确认。
|
||||
|
||||
![][13]
|
||||
|
||||
**Step 3 – 将文件从一个目录移动到另一个目录**
|
||||
|
||||
我们解压了文件。现在我们需要将文件移动到另一个位置。为了将文件从一个位置移动到另一个位置,我们使用 ‘mv’ 命令。所以,让我们打开 tldr 手册的 mv 命令。
|
||||
|
||||
```
|
||||
$ tldr mv
|
||||
```
|
||||
|
||||
选择正确的命令将文件从一个位置移动到另一个位置。在我们的例子中,第一个命令可以工作,所以让我们选中它。
|
||||
|
||||
![][14]
|
||||
|
||||
输入要移动的文件路径,并输入目标路径并按 Enter 键。
|
||||
|
||||
![][15]
|
||||
|
||||
**附注:** 输入 **y!** 或 **yes!** 来以 **sudo** 权限运行命令。
|
||||
|
||||
正如你在上面的截图中看到的,我将名为 **‘tldr’**的文件移动到 **‘/usr/local/bin/’** 。
|
||||
|
||||
要了解更多细节,请参考项目最后给出的GitHub页面。
|
||||
|
||||
|
||||
### 总结
|
||||
|
||||
别误会我。毫无疑问**Man 手册**是伟大的!但是,正如我已经说过的,许多手册页都很全面,缺少有用的示例。我不可能记住所有带有复杂标志的冗长命令。有时,我花了很多时间在手册上,却还是一窍不通。Tldr 手册帮助我在几分钟内找到了我需要的东西。而且,我们偶尔会使用一些命令,然后就会完全忘记它们。另一方面,Tldr 手册实际上在使用那些使用率很低的命令时很有帮助。Tldr++ 客户端通过智能的用户交互使这个任务变得更容易。试试吧,在下面的评论区告诉我们你对这个工具的看法。
|
||||
|
||||
以上,更多的好的分享将会陆续推出,请继续保持关注!
|
||||
|
||||
祝好!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/search-study-and-practice-linux-commands-on-the-fly/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/learn-use-man-pages-efficiently/
|
||||
[2]: https://www.ostechnix.com/3-good-alternatives-man-pages-every-linux-user-know/
|
||||
[3]: https://github.com/isacikgoz/tldr/releases
|
||||
[4]: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/
|
||||
[5]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[6]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-1.png
|
||||
[7]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-11.png
|
||||
[8]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-12.png
|
||||
[9]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-13.png
|
||||
[10]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-4.png
|
||||
[11]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-6.png
|
||||
[12]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-7.png
|
||||
[13]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-8.png
|
||||
[14]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-9.png
|
||||
[15]: http://www.ostechnix.com/wp-content/uploads/2019/01/tldr-10.png
|
@ -0,0 +1,94 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (My 3 favorite open source productivity apps)
|
||||
[#]: via: (https://opensource.com/article/21/1/open-source-productivity-apps)
|
||||
[#]: author: (Taz Brown https://opensource.com/users/heronthecli)
|
||||
|
||||
我最喜欢的 3 个开源生产力应用
|
||||
======
|
||||
简化你的敏捷工作流程,提高你的工作效率。
|
||||
![Working on a team, busy worklife][1]
|
||||
|
||||
生产力应用确实可以让你的工作流程变得更加轻松。在本文中,我将分享一些我用来简化工作流程、提高整体生产力的开源应用。本文中所有的生产力应用都是免费的 Linux 生产力应用。
|
||||
|
||||
### Tomboy/Gnote
|
||||
|
||||
[Tomboy][2] 是一款可以在 Linux、Windows 和 macOS 上使用的简单记事本应用。它是 GNU LGPLv2 下的开源软件。
|
||||
|
||||
Tomboy 使用起来非常简单。你写下一张纸条,选择是否将它贴在桌面上,完成后就可以删除它。
|
||||
|
||||
![Tomboy and Gnote][3]
|
||||
|
||||
(Tonya "Taz" Brown, [CC BY-SA 4.0][4])
|
||||
|
||||
它(以及它的克隆版 [Gnote][5])是一个很好的快速记笔记的小程序。很多时候,当我在做某件事情的时候,会有一些想法或思路想要回忆。Tomboy 可以让我快速创建一个笔记,在我忘记之前把我的想法记下来。然后我就可以把这些想法转移到一个更长久的地方。
|
||||
|
||||
### Joplin
|
||||
|
||||
[Joplin][6] 是一个开源的记事和待办事项应用。它是跨平台的,可以在 Linux、Windows、macOS、iOS 和 Android 上使用,并且采用 MIT 许可开源。
|
||||
|
||||
![Joplin][7]
|
||||
|
||||
([Joplin 仓库][8]提供的截图,作者:Tonya "Taz" Brown,[CC BY-SA 4.0][4])
|
||||
|
||||
它可以使用 Dropbox、OneDrive、Nextcloud 等云同步服务进行同步。它很容易安装,可能就在你的 Linux 仓库里。当你在桌面上安装它时,它一个应用中实际包含了两个。你会得到一个标准的图形用户界面 (GUI),或者打开一个终端,在那里使用 Joplin。
|
||||
|
||||
桌面有一个非常漂亮的界面。笔记被组织在笔记本中,这基本上使它们成为你的手册页。而且因为笔记是 Markdown 格式的,所以它们会被渲染,你可以实时编辑它们。我喜欢使用 Markdown,因为它让我写笔记的速度很快。你也可以导出或导入 Joplin 笔记。
|
||||
|
||||
### Evolution
|
||||
|
||||
[Evolution][9] 是一款开源的个人信息管理应用,它与 Outlook 非常相似,但我认为更适合我使用。它具有电子邮件、工作、笔记、链接、日历和地址簿功能。它是 LGPL 和其他[许可证][10]下的开源软件。
|
||||
|
||||
![GNOME Evolution][11]
|
||||
|
||||
([GNOME][12], [CC BY-SA 4.0][4])
|
||||
|
||||
我在运行 Fedora 的台式电脑上使用它。它的效率很高,绝对能帮助我度过繁忙的一天。它让我能够使用 Linux 开展业务;我还能要求什么呢?
|
||||
|
||||
要在 Fedora 中使用它,打开一个终端并输入以下命令:
|
||||
|
||||
|
||||
```
|
||||
sudo dnf remove evolution
|
||||
sudo dnf update
|
||||
sudo dnf install evolution
|
||||
sudo dnf install evolution-ews
|
||||
```
|
||||
|
||||
### 我的常用工具
|
||||
|
||||
这些工具是我的主力军,我已经依赖了一段时间。使用它们超越了它们的基本功能,使我更有效率、更有效果、更有生产力。作为一名技术产品经理和敏捷专家,我很自豪,我仍然使用 Linux 和其他开源软件,即使我工作的公司不这样做。
|
||||
|
||||
* * *
|
||||
|
||||
_本文原载于 [Course Hero][13],经授权转载。_
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/open-source-productivity-apps
|
||||
|
||||
作者:[Taz Brown][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[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/heronthecli
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_dev_email_chat_video_work_wfm_desk_520.png?itok=6YtME4Hj (Working on a team, busy worklife)
|
||||
[2]: https://wiki.gnome.org/Apps/Tomboy
|
||||
[3]: https://opensource.com/sites/default/files/uploads/tomboy-gnote.png (Tomboy and Gnote)
|
||||
[4]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[5]: https://wiki.gnome.org/Apps/Gnote
|
||||
[6]: https://joplinapp.org/
|
||||
[7]: https://opensource.com/sites/default/files/uploads/joplin_0.jpg (Joplin)
|
||||
[8]: https://github.com/laurent22/joplin
|
||||
[9]: https://wiki.gnome.org/Apps/Evolution
|
||||
[10]: https://gitlab.gnome.org/GNOME/evolution/-/blob/master/COPYING
|
||||
[11]: https://opensource.com/sites/default/files/uploads/evolution.png (GNOME Evolution)
|
||||
[12]: https://help.gnome.org/users/evolution/stable/intro-main-window.html.en
|
||||
[13]: https://www.coursehero.com/file/74086904/Personal-productivity-using-open-source-software-tools/
|
Loading…
Reference in New Issue
Block a user