Merge pull request #11203 from thecyanbird/terminalizer

翻译完毕,20181005 Terminalizer - A Tool To Record Your Terminal And Generate Animated Gif Images.md
This commit is contained in:
geekpi 2018-11-15 09:01:21 +08:00 committed by GitHub
commit 59915f849c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 162 additions and 173 deletions

View File

@ -1,173 +0,0 @@
thecyanbird translating
Terminalizer A Tool To Record Your Terminal And Generate Animated Gif Images
======
This is know topic for most of us and i dont want to give you the detailed information about this flow. Also, we had written many article under this topics.
Script command is the one of the standard command to record Linux terminal sessions. Today we are going to discuss about same kind of tool called Terminalizer.
This tool will help us to record the users terminal activity, also will help us to identify other useful information from the output.
### What Is Terminalizer
Terminalizer allow users to record their terminal activity and allow them to generate animated gif images. Its highly customizable CLI tool that user can share a link for an online player, web player for a recording file.
**Suggested Read :**
**(#)** [Script A Simple Command To Record Your Terminal Session Activity][1]
**(#)** [Automatically Record/Capture All Users Terminal Sessions Activity In Linux][2]
**(#)** [Teleconsole A Tool To Share Your Terminal Session Instantly To Anyone In Seconds][3]
**(#)** [tmate Instantly Share Your Terminal Session To Anyone In Seconds][4]
**(#)** [Peek Create a Animated GIF Recorder in Linux][5]
**(#)** [Kgif A Simple Shell Script to Create a Gif File from Active Window][6]
**(#)** [Gifine Quickly Create An Animated GIF Video In Ubuntu/Debian][7]
There is no distribution official package to install this utility and we can easily install it by using Node.js.
### How To Install Noje.js in Linux
Node.js can be installed in multiple ways. Here, we are going to teach you the standard method.
For Ubuntu/LinuxMint use [APT-GET Command][8] or [APT Command][9] to install Node.js
```
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
```
For Debian use [APT-GET Command][8] or [APT Command][9] to install Node.js
```
# curl -sL https://deb.nodesource.com/setup_8.x | bash -
# apt-get install -y nodejs
```
For **`RHEL/CentOS`** , use [YUM Command][10] to install tmux.
```
$ sudo curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
$ sudo yum install epel-release
$ sudo yum -y install nodejs
```
For **`Fedora`** , use [DNF Command][11] to install tmux.
```
$ sudo dnf install nodejs
```
For **`Arch Linux`** , use [Pacman Command][12] to install tmux.
```
$ sudo pacman -S nodejs npm
```
For **`openSUSE`** , use [Zypper Command][13] to install tmux.
```
$ sudo zypper in nodejs6
```
### How to Install Terminalizer
As you have already installed prerequisite package called Node.js, now its time to install Terminalizer on your system. Simple run the below npm command to install Terminalizer.
```
$ sudo npm install -g terminalizer
```
### How to Use Terminalizer
To record your session activity using Terminalizer, just run the following Terminalizer command. Once you started the recording then play around it and finally hit `CTRL+D` to exit and save the recording.
```
# terminalizer record 2g-session
defaultConfigPath
The recording session is started
Press CTRL+D to exit and save the recording
```
This will save your recording session as a YAML file, in this case my filename would be 2g-session-activity.yml.
![][15]
Just type few commands to verify this and finally hit `CTRL+D` to exit the current capture. When you hit `CTRL+D` on the terminal and you will be getting the below output.
```
# logout
Successfully Recorded
The recording data is saved into the file:
/home/daygeek/2g-session.yml
You can edit the file and even change the configurations.
```
![][16]
### How to Play the Recorded File
Use the below command format to paly your recorded YAML file. Make sure, you have to input your recorded file instead of us.
```
# terminalizer play 2g-session
```
Render a recording file as an animated gif image.
```
# terminalizer render 2g-session
```
`Note:` Below two commands are not implemented yet in the current version and will be available in the next version.
If you would like to share your recording to others then upload a recording file and get a link for an online player and share it.
```
terminalizer share 2g-session
```
Generate a web player for a recording file
```
# terminalizer generate 2g-session
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/terminalizer-a-tool-to-record-your-terminal-and-generate-animated-gif-images/
作者:[Prakash Subramanian][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/prakash/
[1]: https://www.2daygeek.com/script-command-record-save-your-terminal-session-activity-linux/
[2]: https://www.2daygeek.com/automatically-record-all-users-terminal-sessions-activity-linux-script-command/
[3]: https://www.2daygeek.com/teleconsole-share-terminal-session-instantly-to-anyone-in-seconds/
[4]: https://www.2daygeek.com/tmate-instantly-share-your-terminal-session-to-anyone-in-seconds/
[5]: https://www.2daygeek.com/peek-create-animated-gif-screen-recorder-capture-arch-linux-mint-fedora-ubuntu/
[6]: https://www.2daygeek.com/kgif-create-animated-gif-file-active-window-screen-recorder-capture-arch-linux-mint-fedora-ubuntu-debian-opensuse-centos/
[7]: https://www.2daygeek.com/gifine-create-animated-gif-vedio-recorder-linux-mint-debian-ubuntu/
[8]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
[9]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
[10]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
[11]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
[12]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
[13]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
[14]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[15]: https://www.2daygeek.com/wp-content/uploads/2018/10/terminalizer-record-2g-session-1.gif
[16]: https://www.2daygeek.com/wp-content/uploads/2018/10/terminalizer-play-2g-session.gif

View File

@ -0,0 +1,162 @@
Terminalizer - 一个记录您终端活动并且生成 Gif 图像的工具
====
今天我们要讨论一个广为人知的主题,我们也围绕这个主题写过许多的文章,因此我不会针对这个如何记录终端会话流程给出太多具体的资料。
我们可以使用脚本命令来记录 Linux 的终端会话,这也是大家公认的一种办法。不过今天我们将来介绍一个能起到相同作用的工具 —— Terminalizer。
这个工具可以帮助我们记录用户的终端活动,以帮助我们从输出的文件中找到有用的信息。
### 什么是 Terminlizer
用户可以用 Terminlizer 记录他们的终端活动并且生成一个 Gif 图像。它是一个允许高度定制的 CLI 工具。用户可以在网络播放器,在线播放器上用链接分享他们记录下的文件。
**推荐阅读:**<br>
**(#)** [Script 一个记录您终端对话的简单工具][1]<br>
**(#)** [在 Linux 上自动记录/捕捉所有用户的终端对话][2]<br>
**(#)** [Teleconsole 一个能立即与任何人分享您终端对话的工具][3]<br>
**(#)** [tmate 立即与任何人分享您的终端对话][4]<br>
**(#)** [Peek 在 Linux 里制造一个 Gif 记录器][5]<br>
**(#)** [Kgif 一个能生成 Gif 图片,以记录窗口活动的简单 Shell 脚本][6]<br>
**(#)** [Gifine 在 Ubuntu/Debian 里快速制造一个 Gif 视频][7]
目前没有发行版拥有官方软件包来安装此实用程序,不过我们可以用 Node.js 来安装它。
### 如何在 Linux 上安装 Node.js
安装 Node.js 有许多种方法。我们在这里将会教您一个常用的方法。
在 Ubuntu/LinuxMint 上可以使用 [APT-GET 命令][8] 或者 [APT 命令][9] 来安装 Node.js
```
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
```
在 Debian 上使用 [APT-GET 命令][8] 或者 [APT 命令][9] 来安装 Node.js
```
# curl -sL https://deb.nodesource.com/setup_8.x | bash -
# apt-get install -y nodejs
```
**`RHEL/CentOS`** 上, 使用 [YUM 命令][10] 来安装.
```
$ sudo curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
$ sudo yum install epel-release
$ sudo yum -y install nodejs
```
**`Fedora`** 上, 用 [DNF 命令][11] 来安装 tmux.
```
$ sudo dnf install nodejs
```
**`Arch Linux`** 上, 用 [Pacman 命令][12] 来安装 tmux.
```
$ sudo pacman -S nodejs npm
```
**`openSUSE`** 上, 用 [Zypper Command][13] 来安装 tmux.
```
$ sudo zypper in nodejs6
```
### 如何安装 Terminalizer
您已经安装了 Node.js 这个先决软件包,现在是时候在您的系统上安装 Terminalizer 了。简单执行如下的 npm 命令即可安装。
```
$ sudo npm install -g terminalizer
```
### 如何使用 Terminalizer
您只需要执行如下的命令,即可使用 Terminalizer 记录您的终端会话活动。您可以敲击 `CTRL+D` 来结束并且保存记录。
```
# terminalizer record 2g-session
defaultConfigPath
The recording session is started
Press CTRL+D to exit and save the recording
```
这将会将您记录的会话保存成一个 YAML 文件, 在这个例子里,我的文件名将会是 2g-session-activity.yml。
![][15]
```
# logout
Successfully Recorded
The recording data is saved into the file:
/home/daygeek/2g-session.yml
You can edit the file and even change the configurations.
```
![][16]
### 如何播放记录下来的文件
使用以下命令来播放您记录的 YAML 文件。在以下操作中,请确保您已经用了您的文件名来替换 2g-session。
```
# terminalizer play 2g-session
```
将记录的文件渲染成 Gif 图像
```
# terminalizer render 2g-session
```
`注意:` 以下的两个命令在此版本尚且不可用,或许在下一版本这两个命令将会付诸使用。
如果您想要将记录的文件分享给其他人,您可以将您的文件上传到在线播放器,并且将链接分享给对方。
```
terminalizer share 2g-session
```
为记录的文件生成一个网络播放器
```
# terminalizer generate 2g-session
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/terminalizer-a-tool-to-record-your-terminal-and-generate-animated-gif-images/
作者:[Prakash Subramanian][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[thecyanbird](https://github.com/thecyanbird)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/prakash/
[1]: https://www.2daygeek.com/script-command-record-save-your-terminal-session-activity-linux/
[2]: https://www.2daygeek.com/automatically-record-all-users-terminal-sessions-activity-linux-script-command/
[3]: https://www.2daygeek.com/teleconsole-share-terminal-session-instantly-to-anyone-in-seconds/
[4]: https://www.2daygeek.com/tmate-instantly-share-your-terminal-session-to-anyone-in-seconds/
[5]: https://www.2daygeek.com/peek-create-animated-gif-screen-recorder-capture-arch-linux-mint-fedora-ubuntu/
[6]: https://www.2daygeek.com/kgif-create-animated-gif-file-active-window-screen-recorder-capture-arch-linux-mint-fedora-ubuntu-debian-opensuse-centos/
[7]: https://www.2daygeek.com/gifine-create-animated-gif-vedio-recorder-linux-mint-debian-ubuntu/
[8]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
[9]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
[10]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
[11]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
[12]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
[13]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
[14]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[15]: https://www.2daygeek.com/wp-content/uploads/2018/10/terminalizer-record-2g-session-1.gif
[16]: https://www.2daygeek.com/wp-content/uploads/2018/10/terminalizer-play-2g-session.gif