A random [rainbow] ascii-art picker which matches your current terminal size
random_ascii
is a simple binary that picks a random uncolored ascii art file
in your collection, which fits in your current terminal window by checking
terminal size and file size, considering the prompt-height to subtract to the
window height, so the chosen file will be entirely visible (no crop, no gap),
since you don't resize the window.
Concerning the "renderer" binary, you have the choice to :
dotacat
dependency using cat
lolcat
...)dotacat
rendererFile sizes are fully parsed just one time, and cached in fileDB, to offer better
performance and avoid unnecessary disk accesses...
Due to the use of clap
to normalize and enhance arguments parsing, the -h
parameter is now reserved to --help
and no longer for the --prompt-height
.
So please use -s
if you want the shorter one.
Install dotacat
or a renderer of your choice, and random_ascii
NB : Cargo binaries directory must be part of your $PATH
(eg : $HOME/.cargo/bin
)
shell
cargo install dotacat
cargo install random_ascii
Just put the binary somewhere in your $PATH
,
(eg : /usr/local/bin
)
```shell sudo curl -fSsL https://gitlab.com/flashbios/rustrandomascii/-/raw/main/latestrelease/randomascii?inline=false -o /usr/local/bin/randomascii sudo chmod +x /usr/local/bin/randomascii
sudo curl -fSsL https://gitlab.com/flashbios/rustrandomascii/-/raw/main/latest_release/dotacat?inline=false -o /usr/local/bin/dotacat sudo chmod +x /usr/local/bin/dotacat ```
dotacat
which is already installed${HOME}/.config/random_ascii/
.ascii
extensionshell
random_ascii
-h
, --help
-V
, --version
-p <PATH>
, --path <PATH>
(default is relative to $HOME/
: .config/random_ascii
)
relative : from your HOME directory, without leading or trailing slashes
(eg : --path Documents/path/to/random_ascii_files
)
(eg : --path /opt/random_ascii_files
)
-e <EXTENSION>
, --extension <EXTENSION>
(eg : --extension txt
)
-s <PROMPT_HEIGHT>
, --prompt-height <PROMPT_HEIGHT>
to filter out files that are too tall (default = 1)
-r
, --reset-cache
with obvious lower performance but fresh data
-d <DISPLAY_RENDERER>
, --display-renderer <DISPLAY_RENDERER>
cat
, lolcat
, dot2acat
or whatever is installed...shell
random_ascii -p /opt/random_ascii_files -e txt -d cat -s 4 -r
When you're ok with the command options, you can append it to your .bashrc
,
.zshrc
(fits well just before a starship prompt)... to enjoy seeing it either
in new tabs and splits.
Just clone/update or download the latest version, and use the binaries,
playing with the arguments, and the samples
directory :
```shell cd "${HOME}/Downloads/randomascii/latestrelease/"
./randomascii -r -d "${HOME}/Downloads/randomascii/latestrelease/dotacat" -p "${HOME}/Downloads/randomascii/samples/" ```
NB : Do not forget to
--reset-cache
at least one time after that,if you install for real and use the defaut
--path
option.