Signed-off-by: 楼湘缘 <2216918339@qq.com>
3.1 KiB
🌀 INTP Loading Animation Simulator
A vibrant, high-contrast terminal loading animation with dramatic flash alerts—designed for the INTP mindset (or anyone who loves stylish CLI effects)!
📌 Overview
This project uses Python’s rich library to render a dynamic, multi-round loading animation directly in your terminal. Each cycle concludes with a bright, eye-catching flash—symbolizing the moment an INTP’s deep thinking finally crystallizes into insight ✨.
Inspired by the INTP cognitive style: slow to start, deeply processing, but brilliantly illuminating upon completion.
🚀 Key Features
- Multi-round simulation: Default of 5 rounds, each with 60 steps—mimicking phased ideation.
- Vibrant dynamic colors: Randomly selected high-saturation RGB combinations (red, green, blue, yellow, magenta, cyan) for maximum visual contrast.
- Classic spinner: Smooth
| / - \rotation indicator for classic terminal loading vibes. - Flash completion alert: A bold white-on-pink burst flashes briefly at the end of each round.
- Fully configurable: Easily adjust rounds, speed, and steps via simple variables.
- Flicker-free rendering: Powered by
rich.livefor smooth, real-time updates in modern terminals.
🛠️ Installation
Requires Python 3.7+ and the rich library.
pip install rich
▶️ Usage
Download or clone main.py, then run:
python main.py
The animation will play in your terminal. Press Enter to exit after completion.
⚙️ Customization
Tweak behavior by editing the configuration block at the top of main.py:
ROUNDS = 5 # Total animation cycles
STEPS = 60 # Steps per cycle (visual length)
SLEEP_STEP = 0.15 # Delay between steps (seconds)
SLEEP_FULL = 0.6 # Duration of the flash effect (seconds)
Save and re-run to see changes.
🎨 Color Strategy
Colors are generated by get_vibrant_color(), using these rules to ensure brightness and distinction:
| Type | RGB Pattern |
|---|---|
| Red | (255, g, b) where g,b ∈ [80–200] |
| Green | (r, 255, b) where r,b ∈ [80–200] |
| Blue | (r, g, 255) where r,g ∈ [80–200] |
| Yellow | (255, 255, b) where b ∈ [0–100] |
| Magenta | (255, g, 255) where g ∈ [0–100] |
| Cyan | (r, 255, 255) where r ∈ [0–100] |
All colors remain vivid while avoiding low-contrast pitfalls.
💡 Ideal Use Cases
- Adding flair to CLI tool startup sequences
- Demoing terminal UI capabilities in talks or tutorials
- Personalizing your dotfiles or developer workflow
- Playfully signaling “deep thought in progress” during demos
📄 License
MIT License — free to use, modify, and distribute.
❤️ Acknowledgements
- Rich – for making beautiful terminal interfaces effortless
- The global community of terminal enthusiasts and creative coders
“I’m not slow—I’m just compiling.” — An INTP somewhere in the matrix