Skip to content

Repository files navigation

pyslowcat

A utility for slowly printing file contents character by character or line by line. Useful for demonstrating code, creating screencasts, or just enjoying a slow read.

usage: slowcat [-h] [-c] [-l] [-s SLEEP] [-p PACE] [-L] [-b] [file]

slowcat - slow concatenation

positional arguments:
  file                  Filename or '-' for stdin. If omitted - walk tree
                        (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -c, --char            Character mode (default: False)
  -l, --line            Line mode (default: True)
  -s SLEEP, --sleep SLEEP
                        Time to sleep between lines (ms) (default: 102)
  -p PACE, --pace PACE  Character-mode pace (sleep between chars) (default:
                        0.003)
  -L, --loop            Loop contents (default: False)
  -b, --bell            Bell sound on newline (default: False)

Installation

Modern Methods (Recommended)

With pipx (Recommended - isolated installation)

pipx install pyslowcat

Bash completions are installed automatically on first run at user level.

For local source installs or automation, use:

./inst.sh --pipx --force

With pip (user-level)

pip install --user pyslowcat

Bash completions are installed automatically on first run at user level.

System-wide installation

sudo pip install pyslowcat

For system-wide completions, run the installer command with --system after install.

Automation / Buildbot

If you are running recurring installs from source (for example via gb), use the wrapper script so installation behavior stays consistent:

./inst.sh --pipx --force

--pipx is user-level and recommended. Use --system only when you intentionally want a system-wide install.

Legacy Method

Build a standalone binary with PyInstaller:

make all
sudo make install PREFIX=/usr/local

Bash Completions

Bash completions are installed automatically when you first run slowcat. Default user-level path:

~/.local/share/bash-completion/completions/slowcat

If you want to manually install or reinstall completions, use:

slowcat-install-completions

For a system-wide installation (requires elevated privileges), use:

slowcat-install-completions --system

Examples

Follow syslog with bell on each newline:

tail -f -n 10 /var/log/syslog | slowcat -cb -

Semi-slowly loop contents of directory tree line for line:

slowcat -l 100 -L

Print a file character by character with custom pace:

slowcat -c -p 0.01 /path/to/file.txt

Read from stdin with longer delays:

cat /etc/hostname | slowcat -s 500

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages