gitmyhub

SalaryCat

Python ★ 90 updated 7d ago

终端小玩具 月薪喵 我真的特别爱你 Salary Cat (Yuexin Miao)小猫

A small terminal toy that plays an animated GIF and optional MP3 music inside your terminal window using ANSI color codes to render each frame. Purely decorative, available as a standalone binary for macOS and Windows.

PythonPillowANSI

SalaryCat (also called Yuexin Miao or monthly-salary cat) is a small terminal toy that plays an animated cat GIF inside your terminal window, looping it continuously, and optionally plays an accompanying MP3 file at the same time. It is a purely decorative program with no practical function beyond amusement.

The program is written in Python and renders each frame of the GIF using ANSI color codes that modern terminals can display. It reads a file named cat.gif (or cat.GIF) from the current directory, and optionally reads music.mp3 for audio. You can replace both files with your own to customize the animation and sound. Standalone binary builds for macOS (Apple Silicon and Intel) and Windows are available from the project's Releases page, so users do not need Python installed at all.

When running via Python, the only required dependency is Pillow, a library for handling image files. Audio playback uses whatever audio tool is already present on the system: afplay on macOS, PowerShell's media player on Windows, or common Linux players such as ffplay, mpv, or mpg123. If none of those are found, the animation still runs without sound.

Command-line options let you adjust playback speed (frames per second), scaling factor, margin size, and rendering style. The default uses solid block characters for sharper pixel-art appearance; an alternative half-block mode is also available, though some terminals show visible seams with that option. A smooth scaling flag softens the frame rendering for a different look.

The project is licensed under the Apache License 2.0.

Where it fits