Skip to content

Commit

Permalink
Add demo (#8)
Browse files Browse the repository at this point in the history
* demo GIF

* Embed demo.gif in README
  • Loading branch information
limitusus authored Oct 15, 2020
1 parent d3fc833 commit 6ac361b
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ A tool to remove file slowly, truncating.

Removing large files with normal `rm` command may cause high I/O load.
This tool truncates the target file gradually, and finally removes it to avoid high I/O load.

![demo](docs/demo.gif)
89 changes: 89 additions & 0 deletions docs/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# terminalizer config
command: /bin/bash -norc
cwd: null

# Export additional ENV variables
env:
recording: true
LC_ALL: C

cols: auto
rows: auto

# Amount of times to repeat GIF
# If value is -1, play once
# If value is 0, loop indefinitely
# If value is a positive number, loop n times
repeat: 0

# Quality
# 1 - 100
quality: 100

frameDelay: auto
maxIdleTime: 2000

# The surrounding frame box
# The `type` can be null, window, floating, or solid`
# To hide the title use the value null
# Don't forget to add a backgroundColor style with a null as type
frameBox:
type: floating
title: Terminalizer
style:
border: 0px black solid
# boxShadow: none
# margin: 0px

# Add a watermark image to the rendered gif
# You need to specify an absolute path for
# the image on your machine or a URL, and you can also
# add your own CSS styles
watermark:
imagePath: null
style:
position: absolute
right: 15px
bottom: 15px
width: 100px
opacity: 0.9

# Cursor style can be one of
# `block`, `underline`, or `bar`
cursorStyle: block

# Font family
# You can use any font that is installed on your machine
# in CSS-like syntax
fontFamily: "Monaco, Lucida Console, Ubuntu Mono, Monospace"

# The size of the font
fontSize: 12

# The height of lines
lineHeight: 1

# The spacing between letters
letterSpacing: 0

# Theme
theme:
background: "transparent"
foreground: "#afafaf"
cursor: "#c7c7c7"
black: "#232628"
red: "#fc4384"
green: "#b3e33b"
yellow: "#ffa727"
blue: "#75dff2"
magenta: "#ae89fe"
cyan: "#708387"
white: "#d5d5d0"
brightBlack: "#626566"
brightRed: "#ff7fac"
brightGreen: "#c8ed71"
brightYellow: "#ebdf86"
brightBlue: "#75dff2"
brightMagenta: "#ae89fe"
brightCyan: "#b1c6ca"
brightWhite: "#f9f9f4"
Binary file added docs/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
233 changes: 233 additions & 0 deletions docs/demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
# terminalizer config
config:
command: /bin/bash -norc
cwd: go-remove-slowly

# Export additional ENV variables
env:
recording: true
LC_ALL: C

cols: 183
rows: 14

# Amount of times to repeat GIF
# If value is -1, play once
# If value is 0, loop indefinitely
# If value is a positive number, loop n times
repeat: 0

quality: 100

frameDelay: auto

# Maximum delay between frames in ms
# Ignored if the `frameDelay` isn't set to `auto`
# Set to `auto` to prevent limiting the max idle time
maxIdleTime: 2000

# The surrounding frame box
# The `type` can be null, window, floating, or solid`
# To hide the title use the value null
# Don't forget to add a backgroundColor style with a null as type
frameBox:
type: floating
title: Terminalizer
style:
border: 0px black solid
# boxShadow: none
# margin: 0px

# Add a watermark image to the rendered gif
# You need to specify an absolute path for
# the image on your machine or a URL, and you can also
# add your own CSS styles
watermark:
imagePath: null
style:
position: absolute
right: 15px
bottom: 15px
width: 100px
opacity: 0.9

# Cursor style can be one of
# `block`, `underline`, or `bar`
cursorStyle: block

# Font family
# You can use any font that is installed on your machine
# in CSS-like syntax
fontFamily: "Monaco, Lucida Console, Ubuntu Mono, Monospace"

# The size of the font
fontSize: 12

# The height of lines
lineHeight: 1

# The spacing between letters
letterSpacing: 0

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

# Records, feel free to edit them
records:
- delay: 0
content: "\e[?1034h"
- delay: 100
content: "bash-4.2$ "
- delay: 1000
content: dd if=/dev/zero of=1G bs=1M count=1024
- delay: 100
content: "\r\n"
- delay: 3000
content: "1024+0 records in\r\n1024+0 records out\r\n1073741824 bytes (1.1 GB) copied, 2.69744 s, 398 MB/s\r\nbash-4.2$ "
- delay: 1000
content: ./remove-slowly 1G
- delay: 1000
content: "\r\nRemoving File: 1G\r\n\r 0 / 1024 [-------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0.00%"
- delay: 200
content: "\r 1 / 1024 [>-----------------------------------------------------------------------------------------------------------------------------------------------------------] 0.10% 03m24s"
- delay: 200
content: "\r 7 / 1024 [=>----------------------------------------------------------------------------------------------------------------------------------------------------------] 0.68% 00m58s"
- delay: 201
content: "\r 24 / 1024 [===>-------------------------------------------------------------------------------------------------------------------------------------------------------] 2.34% 00m25s"
- delay: 200
content: "\r 42 / 1024 [======>----------------------------------------------------------------------------------------------------------------------------------------------------] 4.10% 00m18s"
- delay: 200
content: "\r 59 / 1024 [========>--------------------------------------------------------------------------------------------------------------------------------------------------] 5.76% 00m16s"
- delay: 200
content: "\r 77 / 1024 [===========>-----------------------------------------------------------------------------------------------------------------------------------------------] 7.52% 00m14s"
- delay: 200
content: "\r 95 / 1024 [==============>--------------------------------------------------------------------------------------------------------------------------------------------] 9.28% 00m13s"
- delay: 200
content: "\r 112 / 1024 [================>-----------------------------------------------------------------------------------------------------------------------------------------] 10.94% 00m13s"
- delay: 200
content: "\r 130 / 1024 [===================>--------------------------------------------------------------------------------------------------------------------------------------] 12.70% 00m12s"
- delay: 200
content: "\r 148 / 1024 [======================>-----------------------------------------------------------------------------------------------------------------------------------] 14.45% 00m11s"
- delay: 201
content: "\r 165 / 1024 [========================>---------------------------------------------------------------------------------------------------------------------------------] 16.11% 00m11s"
- delay: 200
content: "\r 183 / 1024 [===========================>------------------------------------------------------------------------------------------------------------------------------] 17.87% 00m11s"
- delay: 200
content: "\r 200 / 1024 [==============================>---------------------------------------------------------------------------------------------------------------------------] 19.53% 00m10s"
- delay: 201
content: "\r 218 / 1024 [================================>-------------------------------------------------------------------------------------------------------------------------] 21.29% 00m10s"
- delay: 200
content: "\r 235 / 1024 [===================================>----------------------------------------------------------------------------------------------------------------------] 22.95% 00m10s"
- delay: 200
content: "\r 253 / 1024 [======================================>-------------------------------------------------------------------------------------------------------------------] 24.71% 00m09s"
- delay: 200
content: "\r 271 / 1024 [========================================>-----------------------------------------------------------------------------------------------------------------] 26.46% 00m09s"
- delay: 200
content: "\r 288 / 1024 [===========================================>--------------------------------------------------------------------------------------------------------------] 28.12% 00m09s"
- delay: 200
content: "\r 305 / 1024 [=============================================>------------------------------------------------------------------------------------------------------------] 29.79% 00m08s"
- delay: 200
content: "\r 323 / 1024 [================================================>---------------------------------------------------------------------------------------------------------] 31.54% 00m08s"
- delay: 201
content: "\r 340 / 1024 [===================================================>------------------------------------------------------------------------------------------------------] 33.20% 00m08s"
- delay: 200
content: "\r 358 / 1024 [=====================================================>----------------------------------------------------------------------------------------------------] 34.96% 00m08s"
- delay: 200
content: "\r 375 / 1024 [========================================================>-------------------------------------------------------------------------------------------------] 36.62% 00m07s"
- delay: 200
content: "\r 393 / 1024 [===========================================================>----------------------------------------------------------------------------------------------] 38.38% 00m07s"
- delay: 201
content: "\r 411 / 1024 [=============================================================>--------------------------------------------------------------------------------------------] 40.14% 00m07s"
- delay: 200
content: "\r 428 / 1024 [================================================================>-----------------------------------------------------------------------------------------] 41.80% 00m07s"
- delay: 200
content: "\r 445 / 1024 [==================================================================>---------------------------------------------------------------------------------------] 43.46% 00m07s"
- delay: 201
content: "\r 463 / 1024 [=====================================================================>------------------------------------------------------------------------------------] 45.21% 00m06s"
- delay: 200
content: "\r 481 / 1024 [========================================================================>---------------------------------------------------------------------------------] 46.97% 00m06s"
- delay: 200
content: "\r 498 / 1024 [==========================================================================>-------------------------------------------------------------------------------] 48.63% 00m06s"
- delay: 200
content: "\r 516 / 1024 [=============================================================================>----------------------------------------------------------------------------] 50.39% 00m06s"
- delay: 200
content: "\r 533 / 1024 [================================================================================>-------------------------------------------------------------------------] 52.05% 00m05s"
- delay: 201
content: "\r 551 / 1024 [==================================================================================>-----------------------------------------------------------------------] 53.81% 00m05s"
- delay: 200
content: "\r 569 / 1024 [=====================================================================================>--------------------------------------------------------------------] 55.57% 00m05s"
- delay: 200
content: "\r 586 / 1024 [========================================================================================>-----------------------------------------------------------------] 57.23% 00m05s"
- delay: 200
content: "\r 603 / 1024 [==========================================================================================>---------------------------------------------------------------] 58.89% 00m05s"
- delay: 201
content: "\r 621 / 1024 [=============================================================================================>------------------------------------------------------------] 60.64% 00m04s"
- delay: 200
content: "\r 639 / 1024 [================================================================================================>---------------------------------------------------------] 62.40% 00m04s"
- delay: 200
content: "\r 656 / 1024 [==================================================================================================>-------------------------------------------------------] 64.06% 00m04s"
- delay: 200
content: "\r 674 / 1024 [=====================================================================================================>----------------------------------------------------] 65.82% 00m04s"
- delay: 200
content: "\r 691 / 1024 [=======================================================================================================>--------------------------------------------------] 67.48% 00m03s"
- delay: 201
content: "\r 708 / 1024 [==========================================================================================================>-----------------------------------------------] 69.14% 00m03s"
- delay: 200
content: "\r 726 / 1024 [=============================================================================================================>--------------------------------------------] 70.90% 00m03s"
- delay: 200
content: "\r 743 / 1024 [===============================================================================================================>------------------------------------------] 72.56% 00m03s"
- delay: 201
content: "\r 761 / 1024 [==================================================================================================================>---------------------------------------] 74.32% 00m03s"
- delay: 200
content: "\r 779 / 1024 [=====================================================================================================================>------------------------------------] 76.07% 00m02s"
- delay: 200
content: "\r 796 / 1024 [=======================================================================================================================>----------------------------------] 77.73% 00m02s"
- delay: 200
content: "\r 814 / 1024 [==========================================================================================================================>-------------------------------] 79.49% 00m02s"
- delay: 200
content: "\r 831 / 1024 [============================================================================================================================>-----------------------------] 81.15% 00m02s"
- delay: 201
content: "\r 849 / 1024 [===============================================================================================================================>--------------------------] 82.91% 00m02s"
- delay: 200
content: "\r 865 / 1024 [==================================================================================================================================>-----------------------] 84.47% 00m01s"
- delay: 200
content: "\r 883 / 1024 [====================================================================================================================================>---------------------] 86.23% 00m01s"
- delay: 200
content: "\r 900 / 1024 [=======================================================================================================================================>------------------] 87.89% 00m01s"
- delay: 201
content: "\r 918 / 1024 [==========================================================================================================================================>---------------] 89.65% 00m01s"
- delay: 200
content: "\r 935 / 1024 [============================================================================================================================================>-------------] 91.31% 00m01s"
- delay: 200
content: "\r 953 / 1024 [=====================================================================================================================================================>-----------] 93.07%"
- delay: 200
content: "\r 970 / 1024 [========================================================================================================================================================>--------] 94.73%"
- delay: 201
content: "\r 988 / 1024 [===========================================================================================================================================================>-----] 96.48%"
- delay: 200
content: "\r 1006 / 1024 [=============================================================================================================================================================>--] 98.24%"
- delay: 200
content: "\r 1023 / 1024 [================================================================================================================================================================] 99.90%"
- delay: 15
content: "\r 1024 / 1024 [============================================================================================================================================================] 100.00% 12s\r\nRemoved 1G\r\nbash-4.2$ "
- delay: 1000
content: "exit\r\n"

0 comments on commit 6ac361b

Please sign in to comment.