faressoft / terminalizer
- суббота, 28 июля 2018 г. в 00:15:27
JavaScript
🦄 Record your terminal and generate animated gif images
Record your terminal and generate animated gif images
Built to be jusT cOol
If you think so, support me by a
star
and afollow
😘
Built while listening to Ever Felt Pt.1 - Otis McDonald
window frames
.font
.colors
.styles
with CSS
.You need first to install Node.js, then install the tool globally using this command:
npm install -g terminalizer
Still facing an issue ? Check the Issues section or open an new issue.
If the installation failed, you may need to install the developement tools to build the C++
addons.
C++
addons that require building. Until we release the first stable version that will include prebuilt binaries for different OSs you may need to install some tools to build for now. Try the following, if they don't solve your installation issue, check https://github.com/nodejs/node-gyp#installation.
For MacOS
xcode-select --install
For RHEL, CentOS, Scientific Linux, Fedora
yum update
yum groupinstall "Development Tools"
For Debian, Ubuntu and derivatives
sudo apt-get update
sudo apt-get install build-essential
For openSUSE/SUSE
zypper refresh
zypper update
zypper install -t pattern devel_C_C++
For Arch Linux and derivatives
sudo pacman -Syyu
sudo pacman -S base-devel
Verifying Installation
gcc -v
make -v
Start recording your terminal using the command record
.
terminalizer record demo
A file called demo.yml
will be created in the current directory. You can open it using any editor to edit the configurations and the recoreded frames. You can replay your recording using the command play
.
terminalizer play demo
Now let's render our recording as an animated gif.
terminalizer render demo
GIF compression is not implementated yet. For now we recommend https://gifcompressor.com.
You can use the option
--help
to get more details about the commands and their options.
terminalizer <command> [options]
Generate a config file in the current directory
terminalizer config
Record your terminal and create a recording file
terminalizer record <recordingFile>
Options
-c, --config Overwrite the default configurations [string]
-d, --command The command to be executed [string] [default: null]
Examples
terminalizer record foo Start recording and create a recording file called foo.yml
terminalizer record foo --config config.yml Start recording with with your own configurations
Play a recording file on your terminal
terminalizer play <recordingFile>
Options
-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]
Render a recording file as an animated gif image
terminalizer render <recordingFile>
Options
-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]
Upload a recording file and get a link for an online player
terminalizer share <recordingFile>
Generate a web player for a recording file
terminalizer generate <recordingFile>
The default config.yml
file is stored at root directory of the project. Execute the bellow command to copy it to your current directory.
Use any editor to edit the copied
config.yml
, then use the option-c
to overwrite the default one.
terminalizer config
command
: Specify a command to be executed like /bin/bash -l
, ls
, or any other commands. The default is bash
for Linux
or powershell.exe
for Windows
.cwd
: Specify the current working directory path. The default is the current working directory path.env
: Export additional ENV variables, to be read by your scripts when start recording.cols
: Explicitly set the number of columns or use auto
to take the current number of columns of your shell.rows
: Explicitly set the number of rows or use auto
to take the current number of columns of your shell.frameDelay
: The delay between frames in ms. If the value is auto
use the actual recording delays.maxIdleTime
: Maximum delay between frames in ms. Ignored if the frameDelay
isn't set to auto
. Set to auto
to prevnt limiting the max idle time.quality
: The quality of the generated GIF image (1 - 100).repeat
: Amount of times to repeat GIF:
-1
, play once.0
, loop indefinitely.a
positive number, loop n times.cursorStyle
: Cursor style can be one of block
, underline
, or bar
.fontFamily
: You can use any font that is installed on your machine like Monaco
or Lucida Console
(CSS-like list).fontSize
: The size of the font in pixels.lineHeight
: The height of lines in pixels.letterSpacing
: The spacing between letters in pixels.You can set the colors of your terminal using one of the CSS formats:
#FFFFFF
.rgb(255, 255, 255)
.hsl(0, 0%, 100%)
.You can use the the value
transparent
too.
The default colors that are assigned to the termianl colors are:
transparent
#afafaf
#c7c7c7
#232628
#fc4384
#b3e33b
#ffa727
#75dff2
#ae89fe
#708387
#d5d5d0
#626566
#ff7fac
#c8ed71
#ebdf86
#75dff2
#ae89fe
#b1c6ca
#f9f9f4
You can add a watermark logo to your generated GIF images.
watermark:
imagePath: AbsolutePathOrURL
style:
position: absolute
right: 15px
bottom: 15px
width: 100px
opacity: 0.9
watermark.imagePath
: An absolute path for the image on your machine or a url.watermark.style
: Apply CSS styles (camelCase) to the watermark image, like resizing it.Terminalizer comes with predefined frames that you can use to make your GIF images look cool.
frameBox.type
: Can be null
, window
, floating
, or solid
.frameBox.title
: To display a title for the frame or null
.frameBox.style
: To apply custom CSS styles or to overwrite the current onces.No frame, just your recording.
Don't forget to add a
backgroundColor
understyle
.
frameBox:
type: null
title: null
style:
backgroundColor: black
frameBox:
type: window
title: Terminalizer
style: []
frameBox:
type: floating
title: Terminalizer
style: []
frameBox:
type: solid
title: Terminalizer
style: []
frameBox:
type: solid
title: null
style: []
You can disable the default shadows and margins by:
frameBox:
type: solid
title: null
style:
boxShadow: none
margin: 0px
The default command that gets recoreded for Linux is bash -l
. You need to change the default command to zsh
.
terminalizer config
command
to zsh
:command: zsh
fontFamily: "Meslo for Powerline, Meslo LG M for Powerline"
-c
to include the config file:terminalizer record demo -c config.yml
error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
Solution:
sudo yum install libXScrnSaver
error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
Solution:
sudo apt-get install libgconf-2-4
This project is under the MIT license.