Skip to content

🇨🇳翻译: terminalizer 🦄 录制 你的 terminal 和 生成 gif 文件 , {找了好久} ❤️ 校对 ✅

Notifications You must be signed in to change notification settings

chinanf-boy/terminalizer-zh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terminalizer explain translate-svg

「 🦄 录制 你的 terminal 和 生成 gif 文件 , {找了好久} 」


校对 ✅

翻译的原文 与日期 最新更新 更多
commit ⏰ 2018 7.31 last 中文翻译

贡献

欢迎 👏 勘误/校对/更新贡献 😊 具体贡献请看

生活

If help, buy me coffee —— 营养跟不上了,给我来瓶营养快线吧! 💰


Terminalizer

npm npm Gitter Unicorn Tweet

录制您的终端并生成动画 gif 图像

录制命令行 jusT cOol 👌 🦄!

如果你这么认为,请给我一个支持star和 afollow😘

一边建,一边听喵喵喵😛



目录

特征

  • 高度可定制.
  • 跨平台 (Linux,Windows,MacOS) .
  • window frames 规则.
  • font 规则.
  • colors 规则.
  • stylesCSS 规则.
  • 水印.
  • 在渲染之前编辑帧并调整延迟.
  • 通过步长值跳过帧以减少渲染帧的数量.
  • 在图像上渲染图像而不是捕获屏幕以获得更好的质量.
  • 配置能力:
    • 能捕获的命令终端 (bash,powershell.exe,yourOwnCommand 等)
    • 当前的工作目录.
    • 列和行数的显式值.
    • GIF 质量和重复.
    • 帧延迟.
    • 帧之间的最大空闲时间.
    • 光标样式.
    • 字体.
    • 字体大小.
    • 线高.
    • 字母间距.
    • 主题.

下一步是什么

  • 网站来啰terminalizer.com.
  • 主目录中的全局配置.
  • share命令上传录制文件并获取在线播放器的链接.
  • Generate命令为录制文件生成 Web 播放器.

安装

你需要先安装Node.js,使用此命令全局安装该工具:

npm install -g terminalizer

仍然面临一个问题?检查问题部分或打开一个新问题.

如果安装失败,您可能需要安装开发工具来构建C++插件.

⚠️Tinnerizer 使用了一些C++需要建筑的插件. 在我们发布第一个包含针对不同操作系统的预构建二进制文件的稳定版本之前,您可能需要安装一些工具来构建. 尝试以下操作,如果它们无法解决您的安装问题,请检查https://github.com/nodejs/node-gyp#installation.

对于 MacOS

xcode-select --install

对于 RHEL,CentOS,Scientific Linux,Fedora

yum update
yum groupinstall "Development Tools"

对于 Debian,Ubuntu 和衍生品

sudo apt-get update
sudo apt-get install build-essential

对于 openSUSE/SUSE

zypper refresh
zypper update
zypper install -t pattern devel_C_C++

适用于 Arch Linux 及其衍生产品

sudo pacman -Syyu
sudo pacman -S base-devel

验证安装

gcc -v
make -v

入门

使用开始录制终端record命令.

terminalizer record demo

一个名为的文件demo.yml将在当前目录中创建. 您可以使用任何编辑器打开它来编辑配置和录制的帧. 您可以使用以下内容重播录制内容play命令.

terminalizer play demo

现在让我们将我们的录音呈现为 GIF 动画.

terminalizer render demo

压缩

GIF 压缩尚未实施. 现在我们推荐https://gifcompressor.com.

用法

你可以使用--help选项以获取有关命令及其选项的更多详细信息

terminalizer <command> [options]

配置

在当前目录中生成配置文件

terminalizer config

录制

录制终端并创建录制文件

terminalizer record <recordingFile>

选项

-c, --config   Overwrite the default configurations [string]
-d, --command  The command to be executed           [string] [default: null]

例子

terminalizer record foo                      Start recording and create a recording file called foo.yml
terminalizer record foo --config config.yml  Start recording with your own configurations

播放

在终端上播放录音文件

terminalizer play <recordingFile>

选项

-r, --real-timing   Use the actual delays between frames as recorded        [boolean] [default: false]
-s, --speed-factor  Speed factor, multiply the frames delays by this factor [number] [default: 1]

渲染 gif

将录制文件渲染为动画 gif 图像

terminalizer render <recordingFile>

选项

-o, --output   A name for the output file                                      [string]
-q, --quality  The quality of the rendered image (1 - 100)                     [number]
-s, --step     To reduce the number of rendered frames (step > 1) [number] [default: 1]

分享

上传录制文件并获取在线播放器的链接

terminalizer share <recordingFile>

生成

为录制文件生成 Web 播放器

terminalizer generate <recordingFile>

配置

默认值config.yml文件存储在项目的根目录中. 执行以下命令将其复制到当前目录.

使用任何编辑器编辑复制的config.yml,然后使用-c选项以覆盖默认值.

terminalizer config

Recording

  • command: 指定要执行的命令/bin/bash -l,ls或任何其他命令. 默认是bash对于Linux要么powershell.exe对于Windows.
  • cwd: 指定当前工作目录路径. 默认值是当前工作目录路径.
  • env: 导出其他 ENV 变量,在开始录制时由脚本读取.
  • cols: 显式设置列数或使用auto获取 shell 的当前列数.
  • rows: 显式设置行数或使用auto获取 shell 的当前行数.

Delays

  • frameDelay: 以 ms 为单位的帧之间的延迟. 如果值是auto使用实际录制延迟.
  • maxIdleTime: 帧之间的最大延迟 (ms) . 如果被忽略了frameDelay未设置为auto. 设置auto防止限制最大空闲时间.

GIF

  • quality: 生成的 GIF 图像的质量 (1 - 100) .
  • repeat: 重复 GIF 的次数:
    • 如果价值是-1,玩一次.
    • 如果价值是0,无限循环.
    • 如果 value 是正数,则循环n倍.

Terminal

  • cursorStyle: 光标样式可以是其中之一block,underline, 要么bar.
  • fontFamily: 您可以使用计算机上安装的任何字体Monaco要么Lucida Console (类似 CSS 的列表) .
  • fontSize: 字体的大小 (以像素为单位) .
  • lineHeight: 以像素为单位的线条高度.
  • letterSpacing: 字母之间的间距,以像素为单位.

Theme

您可以使用以下 CSS 格式之一设置终端的颜色:

  • 十六进制: #FFFFFF.
  • RGB: rgb(255, 255, 255).
  • HSL: hsl(0, 0%, 100%).
  • 名称: white,red,blue.

您可以使用该值transparent太.

分配给终端颜色的默认颜色为:

  • background: #ffffff transparent
  • foreground: #afafaf #afafaf
  • cursor: #c7c7c7 #c7c7c7
  • black: #232628 #232628
  • red: #fc4384 #fc4384
  • green: #b3e33b #b3e33b
  • yellow: #ffa727 #ffa727
  • blue: #75dff2 #75dff2
  • magenta: #ae89fe #ae89fe
  • cyan: #708387 #708387
  • white: #d5d5d0 #d5d5d0
  • brightBlack: #626566 #626566
  • brightRed: #ff7fac #ff7fac
  • brightGreen: #c8ed71 #c8ed71
  • brightYellow: #ebdf86 #ebdf86
  • brightBlue: #75dff2 #75dff2
  • brightMagenta: #ae89fe #ae89fe
  • brightCyan: #b1c6ca #b1c6ca
  • brightWhite: #f9f9f4 #f9f9f4

水印

您可以在生成的 GIF 图像中添加水印徽标.

watermark:
  imagePath: AbsolutePathOrURL
  style:
    position: absolute
    right: 15px
    bottom: 15px
    width: 100px
    opacity: 0.9
  • watermark.imagePath: 计算机上图像的绝对路径或 URL.
  • watermark.style: 将 CSS 样式 (camelCase) 应用于水印图像,如调整大小.

Frame 框

终结器附带预定义的框架,您可以使用它们使您的 GIF 图像看起来很酷.

  • frameBox.type: 可null,window,floating, 要么solid.
  • frameBox.title: 显示框架或标题null.
  • frameBox.style: 应用自定义 CSS 样式或覆盖当前样式.

空框

没有框架,只有你的录制.

别忘了添加一个backgroundColorstyle.

frameBox:
  type: null
  title: null
  style:
    backgroundColor: black

Window 框

frameBox:
  type: window
  title: Terminalizer
  style: []

浮动框架

frameBox:
  type: floating
  title: Terminalizer
  style: []

坚固的框架

frameBox:
  type: solid
  title: Terminalizer
  style: []

没有标题的实心框架

frameBox:
  type: solid
  title: null
  style: []

style 提示

您可以禁用默认阴影和边距.

frameBox:
  type: solid
  title: null
  style:
    boxShadow: none
    margin: 0px

常问问题

如何支持 ZSH

为 Linux 录制的默认命令是bash -l. 您需要将默认命令更改为zsh.

  • 在当前目录中生成配置文件
terminalizer config
  • 在首选编辑器中打开生成的配置文件.

  • 改变commandzsh:

    command: zsh

  • 您可能需要更改字体,检查终端中使用的字体:

    fontFamily: "Meslo for Powerline, Meslo LG M for Powerline"

  • 使用-c覆盖配置文件的选项:

terminalizer record demo -c config.yml

问题

加载共享库时出错: libXss.so.1: cannot open shared object file: No such file or directory

解:

sudo yum install libXScrnSaver

加载共享库时出错: libgconf-2.so.4: cannot open shared object file: No such file or directory

解:

sudo apt-get install libgconf-2-4

执照

该项目受 MIT 许可.

About

🇨🇳翻译: terminalizer 🦄 录制 你的 terminal 和 生成 gif 文件 , {找了好久} ❤️ 校对 ✅

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages