mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-23 21:20:42 +08:00
translating
This commit is contained in:
parent
8dd411bf79
commit
baf4ae9ead
@ -1,148 +0,0 @@
|
||||
[#]: subject: (Test Your Typing Speed in Linux Terminal With Ttyper)
|
||||
[#]: via: (https://itsfoss.com/ttyper/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Test Your Typing Speed in Linux Terminal With Ttyper
|
||||
======
|
||||
|
||||
There are several ways to test and improve your typing speed. You can use online tools, install dedicated applications on the desktop or test in the Linux terminal.
|
||||
|
||||
Linux terminal? That’s right. From [browsing internet][1] to [playing games][2], you can do [so many fun things in the mighty Linux terminal][3]. Testing your typing speed is one of them.
|
||||
|
||||
### Ttyper: Terminal-based typing test tool
|
||||
|
||||
[Ttyper][4] is a tool written in [Rust][5] that allows you to practice your touch typing.
|
||||
|
||||
It gives a random selection of some of the most common English words. The correct typed words are highlighted in green and the incorrect ones in red and this happens in real time. You can press backspace and correct the words but that will contribute to a reduced score.
|
||||
|
||||
![][6]
|
||||
|
||||
When you finish typing all the displayed words, you get the result with your typing speed in words per minute, accuracy and number of correct keypresses. You can _**use Ctrl+C to exit**_ Ttyper if you are not in a mood for typing the entire section.
|
||||
|
||||
![][7]
|
||||
|
||||
You can see Ttyper in action in this GIF recorded by the developer.
|
||||
|
||||
![][8]
|
||||
|
||||
By default, you get 50 words to practice but you may expand that with command options. You can also use a custom text file and use its content to practice typing.
|
||||
|
||||
Command | Contents
|
||||
---|---
|
||||
ttyper | 50 of the 200 most common English words
|
||||
ttyper -w 100 | 100 of the 200 most common English words
|
||||
ttyper -w 100 -l english1000 | 100 of the 1000 most common English words
|
||||
ttyper text.txt | contents of test.txt split at whitespace
|
||||
|
||||
Ttyper also focuses on developers. It supports several programming languages and if you are a programmer, you may use it to test and improve your typing while you code.
|
||||
|
||||
![][9]
|
||||
|
||||
As of now, C, Csharp, Go, HTML, Java, JavaScript, Python, Ruby and Rust languages are supported.
|
||||
|
||||
You may change the language in the following manner:
|
||||
|
||||
```
|
||||
ttyper -l html
|
||||
```
|
||||
|
||||
By the way, the double ‘T’ in ‘Ttyper’ is not a typo. It is deliberate as TTY (**T**ele**TY**pewriter) represent the [terminal emulator][10], an indication that it is a terminal tool.
|
||||
|
||||
**Recommended Read:**
|
||||
|
||||
![][11]
|
||||
|
||||
#### [Present Slides in Linux Terminal With This Nifty Python Tool][12]
|
||||
|
||||
There are so many amusing and fun stuff you can do in the terminal. Making and presenting slides is just one of them.
|
||||
|
||||
### Installing Ttyper on Linux
|
||||
|
||||
Ttyper is built with Rust and you can install it on any Linux distribution that has support for Rust programming language and its [Cargo package manager][13].
|
||||
|
||||
Cargo is the Rust equivalent to Python’s PIP. There is a [central repository][14] and you can download and install the Rust packages along with its dependencies easily with Cargo.
|
||||
|
||||
I am going to add the instructions for installing Cargo on Ubuntu-based Linux distributions. You should be able to install it using your [distribution’s package manager][15].
|
||||
|
||||
Please make sure that you have universe repository enabled on Ubuntu. You can install Cargo with this command:
|
||||
|
||||
```
|
||||
sudo apt install cargo
|
||||
```
|
||||
|
||||
It will install Cargo package manager along with `rustc` package for Rust language.
|
||||
|
||||
Once you have Cargo installed on your system, use it install Ttyper with this command:
|
||||
|
||||
```
|
||||
cargo install ttyper
|
||||
```
|
||||
|
||||
This will add an executable rust file in .cargo/bin directory under your home directory. It will be mentioned at the end of the output of the package installation.
|
||||
|
||||
![][16]
|
||||
|
||||
You may switch to this directory:
|
||||
|
||||
```
|
||||
cd ~/.cargo/bin
|
||||
```
|
||||
|
||||
and run the ttyper executable:
|
||||
|
||||
```
|
||||
ttyper
|
||||
```
|
||||
|
||||
Of course, it’s not very convenient. This is why you should [add this directory to the PATH variable][17]. If you are familiar with the Linux command line, you can easily do that.
|
||||
|
||||
Unfortunately, I cannot give you the exact commands here because you need to provide the absolute PATH to this directory and that path name will differ based on your username. For example, for me, it is /home/abhishek/.cargo/bin. This absolute PATH will be different for you.
|
||||
|
||||
I advise reading about [absolute and relative path][18] for more clarity on this topic.
|
||||
|
||||
You can uninstall Ttyper by removing the binary file or use Cargo command in this manner:
|
||||
|
||||
```
|
||||
cargo uninstall ttyper
|
||||
```
|
||||
|
||||
If you like this nifty terminal tool, [star it on GitHub][4] to appreciate the developer’s effort.
|
||||
|
||||
As I mentioned at the beginning of this article, you can do a lot of cool stuff in the terminal. If you want to surprise your colleagues, maybe you can try [making presentation slides entirely in the Linux terminal][12].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ttyper/
|
||||
|
||||
作者:[Abhishek Prakash][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/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/terminal-web-browsers/
|
||||
[2]: https://itsfoss.com/best-command-line-games-linux/
|
||||
[3]: https://itsfoss.com/funny-linux-commands/
|
||||
[4]: https://github.com/max-niederman/ttyper
|
||||
[5]: https://www.rust-lang.org/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ttyper-typing-speed-test-linux.png?resize=800%2C441&ssl=1
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/ttyper-typing-test-result.png?resize=800%2C547&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ttyper.gif?resize=800%2C498&ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/ttyper-typing-test-html.png?resize=800%2C441&ssl=1
|
||||
[10]: https://itsfoss.com/linux-terminal-emulators/
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/linux-terminal-presentation.jpg?fit=800%2C450&ssl=1
|
||||
[12]: https://itsfoss.com/presentation-linux-terminal/
|
||||
[13]: https://doc.rust-lang.org/cargo/index.html
|
||||
[14]: https://crates.io/
|
||||
[15]: https://itsfoss.com/package-manager/
|
||||
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/installing-ttyper-linux.png?resize=800%2C399&ssl=1
|
||||
[17]: https://itsfoss.com/add-directory-to-path-linux/
|
||||
[18]: https://linuxhandbook.com/absolute-vs-relative-path/
|
@ -0,0 +1,138 @@
|
||||
[#]: subject: (Test Your Typing Speed in Linux Terminal With Ttyper)
|
||||
[#]: via: (https://itsfoss.com/ttyper/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
用 Ttyper 测试你在 Linux 终端的打字速度
|
||||
======
|
||||
有几种方法可以测试和提高你的打字速度。你可以使用在线工具,在桌面上安装专门的应用,或者在 Linux 终端测试。
|
||||
|
||||
Linux终端?是的。从[浏览互联网][1]到[玩游戏][2],你可以在强大的 Linux 终端中做[许多有趣的事情][3]。测试你的打字速度就是其中之一。
|
||||
|
||||
### Ttyper:基于终端的打字测试工具
|
||||
|
||||
[Ttyper][4] 是一个用 [Rust][5] 编写的工具,允许你练习打字。
|
||||
|
||||
它给出了一些最常见的英语单词的随机选择。打出的正确单词用绿色突出显示,错误的用红色突出显示,而且这是实时发生的。你可以按退格键纠正单词,但这将导致分数下降。
|
||||
|
||||
![][6]
|
||||
|
||||
当你打完所有显示的单词后,你会得到你的打字速度(每分钟字数)、准确率和正确按键数的结果。如果你没有心情打完全部,你可以使用 _**Ctrl+C**_ 退出 Ttyper。
|
||||
|
||||
![][7]
|
||||
|
||||
你可以在这个由开发者录制的 GIF 中看到 Ttyper 的操作。
|
||||
|
||||
![][8]
|
||||
|
||||
默认情况下,你有 50 个单词可以练习,但你可以用命令选项来扩大。你还可以使用一个自定义的文本文件,用它的内容来练习打字。
|
||||
|
||||
命令 | 内容
|
||||
---|---
|
||||
ttyper | 200 个最常见的英语单词中的 50 个
|
||||
ttyper -w 100 | 200 个最常见的英语单词中的 100 个
|
||||
ttyper -w 100 -l english1000 | 1000 个最常见的英语单词中的 100 个
|
||||
ttyper text.txt | 内容用空格分隔的 test.txt
|
||||
|
||||
Ttyper 也专注于开发者。它支持几种编程语言,如果你是一个程序员,你可以用它来测试和改进你在编码时的打字速度。
|
||||
|
||||
![][9]
|
||||
|
||||
截至目前,支持 C、Csharp、Go、HTML、Java、JavaScript、Python、Ruby 和 Rust 语言。
|
||||
|
||||
你可以通过以下方式改变语言:
|
||||
|
||||
```
|
||||
ttyper -l html
|
||||
```
|
||||
|
||||
顺便说一下,“Ttyper” 中的双 “T” 不是一个打字错误。它是故意的,因为TTY(**T**ele**TY**pewriter)代表[终端模拟器][10],表明它是一个终端工具。
|
||||
|
||||
### 在 Linux 上安装 Ttyper
|
||||
|
||||
Ttyper 是用 Rust 构建的,你可以把它安装在任何支持 Rust 编程语言及其 [Cargo 软件包管理器][13]的 Linux 发行版上。
|
||||
|
||||
Cargo 相当于 Python 中的 PIP。它有一个[中央仓库][14],你可以用 Cargo 轻松地下载和安装 Rust 包和它的依赖项。
|
||||
|
||||
|
||||
我将添加在基于 Ubuntu 的 Linux 发行版上安装 Cargo 的说明。你应该可以用你的[发行版的包管理器][15]来安装它。
|
||||
|
||||
请确保你在 Ubuntu 上启用了 universe 仓库。你可以用这个命令来安装 Cargo:
|
||||
|
||||
```
|
||||
sudo apt install cargo
|
||||
```
|
||||
|
||||
它将安装 Cargo 包管理器和 Rust 语言的 `rustc` 包。
|
||||
|
||||
当你的系统安装了 Cargo,就可以用这个命令来安装 Ttyper:
|
||||
|
||||
```
|
||||
cargo install ttyper
|
||||
```
|
||||
|
||||
这将在你的主目录下的 .cargo/bin 目录中添加一个可执行 Rust 文件。它将在软件包安装输出的最后显示。
|
||||
|
||||
![][16]
|
||||
|
||||
你可以切换到这个目录:
|
||||
|
||||
```
|
||||
cd ~/.cargo/bin
|
||||
```
|
||||
|
||||
并运行 ttyper 可执行文件:
|
||||
|
||||
```
|
||||
ttyper
|
||||
```
|
||||
|
||||
当然,这不是很方便。这就是为什么你应该[把这个目录添加到 PATH 变量中][17]。如果你熟悉 Linux 的命令行,你可以很容易做到这一点。
|
||||
|
||||
不幸的是,我不能在这里给你确切的命令,因为你需要提供这个目录的绝对路径,而这个路径名称会根据你的用户名而不同。例如,对我来说,它是 /home/abhishek/.cargo/bin。这个绝对路径对你来说会有所不同。
|
||||
|
||||
我建议阅读[绝对路径和相对路径][18]以了解更多关于这个问题的信息。
|
||||
|
||||
你可以通过删除二进制文件来卸载 Ttyper,或者用 Cargo 命令来卸载:
|
||||
|
||||
```
|
||||
cargo uninstall ttyper
|
||||
```
|
||||
|
||||
如果你喜欢这个灵巧的终端工具,[在 GitHub 上给它加星][4]以感谢开发者的努力。
|
||||
|
||||
正如我在本文开头提到的,你可以在终端做很多很酷的事情。如果你想给你的同事一个惊喜,也许你可以试试[完全在 Linux 终端中制作幻灯片][12]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ttyper/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/terminal-web-browsers/
|
||||
[2]: https://itsfoss.com/best-command-line-games-linux/
|
||||
[3]: https://itsfoss.com/funny-linux-commands/
|
||||
[4]: https://github.com/max-niederman/ttyper
|
||||
[5]: https://www.rust-lang.org/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ttyper-typing-speed-test-linux.png?resize=800%2C441&ssl=1
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/ttyper-typing-test-result.png?resize=800%2C547&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ttyper.gif?resize=800%2C498&ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/ttyper-typing-test-html.png?resize=800%2C441&ssl=1
|
||||
[10]: https://itsfoss.com/linux-terminal-emulators/
|
||||
[13]: https://doc.rust-lang.org/cargo/index.html
|
||||
[14]: https://crates.io/
|
||||
[15]: https://itsfoss.com/package-manager/
|
||||
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/installing-ttyper-linux.png?resize=800%2C399&ssl=1
|
||||
[17]: https://itsfoss.com/add-directory-to-path-linux/
|
||||
[18]: https://linuxhandbook.com/absolute-vs-relative-path/
|
Loading…
Reference in New Issue
Block a user