- Complete rewrite as standalone Python executable - Add multiple train types (Classic, D51, C51) - Implement flying mode, accident mode, and speed control - Remove external dependencies (now pure Python with ANSI codes) - Add professional documentation (README, CONTRIBUTING, CHANGELOG) - Update author information to Reverend Steven Milanese - Add installation via Makefile - Clean up virtual environments and old files - Enhance README with badges, platform instructions, and links This transforms sl into a production-ready command-line tool following software engineering best practices while maintaining its core purpose as a fun terminal animation.
7.1 KiB
🚂 sl - Steam Locomotive
A joke command that displays an animated steam locomotive in your terminal when you accidentally type 'sl' instead of 'ls'.
==== ________ ___________
_D _| |_______/ \__I_I_____===__|_________|
|(_)--- | H\________/ | | =|___ ___|
/ | | H | | | | ||_| |_||
| | | H |__--------------------| [___] |
| ________|___H__/__|_____/[][]~\_______| |
|/ | |-----------I_____I [][] [] D |=======|__
__/ =| o |=-~~\ /~~\ /~~\ /~~\ ____Y___________|__
|/-=|___|= || || || |_____/~\___/
\_/ \O=====O=====O=====O_/ \_/
🎥 Demo
Watch the train cross your terminal when you mistype!
✨ Features
- 🚂 Multiple train types - Classic, D51, and C51 locomotives
- ✈️ Flying mode - Make the train fly across the sky (
-F) - 💥 Accident mode - Watch a dramatic crash (
-a) - 🎨 Colorful ASCII art - Beautiful colored trains with dynamic smoke
- ⚡ Adjustable speed - Control animation speed
- 📐 Terminal-aware - Handles terminal resizing gracefully
- 🛡️ Clean exit - Proper cleanup and Ctrl+C handling
- 🪶 Lightweight - No external dependencies, pure Python
📦 Installation
Quick Install (Recommended)
# Clone the repository
git clone https://github.com/developtheweb/slTrain.git
cd slTrain
# Install to /usr/local/bin
sudo make install
Platform-Specific Instructions
🐧 Linux
# Debian/Ubuntu
git clone https://github.com/developtheweb/slTrain.git
cd slTrain
sudo make install
# Arch Linux (AUR)
# Coming soon!
# Manual install
sudo cp sl /usr/local/bin/
sudo chmod +x /usr/local/bin/sl
🍎 macOS
# Using Homebrew (coming soon)
# brew install sl
# Manual install
git clone https://github.com/developtheweb/slTrain.git
cd slTrain
sudo make install
🐳 Docker
# Run without installing
docker run --rm -it ghcr.io/developtheweb/sl:latest
# Alias for easy use
alias sl='docker run --rm -it ghcr.io/developtheweb/sl:latest'
Uninstall
sudo make uninstall
# or
sudo rm /usr/local/bin/sl
🚀 Usage
Simply type sl instead of ls:
$ sl # Classic train
$ sl -F # Flying train
$ sl -a # Train accident
$ sl -c # C51 train type
$ sl -l # Long train (D51)
$ sl -s 2.0 # Double speed
$ sl --help # Show help
Options
| Option | Long Form | Description |
|---|---|---|
-a |
--accident |
An accident occurs partway through |
-F |
--fly |
Make the train fly through the sky |
-l |
--long |
Use a longer train (D51) |
-c |
--C51 |
Use the C51 train type |
-s |
--speed |
Animation speed multiplier (default: 1.0) |
-v |
--version |
Show version information |
-h |
--help |
Show help message |
🤔 Why sl?
We've all done it - typed sl when we meant ls. Instead of getting an error, why not get a gentle reminder in the form of a steam locomotive chugging across your terminal?
Benefits:
- 📚 Learn to type more carefully - Muscle memory training through humor
- 😄 Add whimsy to your command line - Because terminals can be fun too
- 🎭 Surprise your coworkers - Watch their confusion turn to delight
- 🧘 Take a brief mental break - Sometimes you need a train break
📋 Requirements
- Python 3.6 or higher
- Unix-like terminal with ANSI escape code support
- A sense of humor 😄
🤝 Contributing
We love contributions! Please see our Contributing Guidelines for details.
Quick Start for Contributors
# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/slTrain.git
cd slTrain
# Create a feature branch
git checkout -b feature/amazing-feature
# Make your changes and test
./sl -F # Test your changes
# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature
💖 Support the Project
If you enjoy sl, consider supporting the development:
- ⭐ Star this repository - It helps others discover the project
- 🐛 Report bugs - Help us improve by reporting issues
- 💡 Suggest features - Share your ideas for new train types or animations
- 🌐 Visit my website - Learn more at StevenMilanese.com
- ☕ Buy me a coffee - Support development at StevenMilanese.com/support
🔒 Security
Found a security issue? Please see our Security Policy for responsible disclosure.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
👨💻 Author
Reverend Steven Milanese
- 🌐 Website: StevenMilanese.com
- 📧 Email: contact@stevenmilanese.com
- 🐙 GitHub: @developtheweb
- 💼 LinkedIn: Connect with me
🙏 Acknowledgments
- Inspired by the original
slcommand by Toyoda Masashi - ASCII art trains adapted from various sources
- Thanks to all contributors who have helped improve this project
- Special thanks to the first stargazer who inspired this update! ⭐
📊 Project Stats
Remember: It's not a bug, it's a feature! 🚂
Made with ❤️ by Reverend Steven Milanese
Visit StevenMilanese.com for more projects
