A bare sl now randomizes train type, coal cars, color livery, and speed each run, with an occasional whistle (25%), rare flight (10%), and very rare crash (5%). Any explicit flag disables the randomness entirely, keeping all options deterministic and backward compatible. Rewrite the README around the project's actual character: surprise mode odds table, a how-it-works section on the renderer, and a FAQ. Remove broken references (missing demo gif, SECURITY.md, unverified Docker image).
3.5 KiB
3.5 KiB
Changelog
All notable changes to the sl (Steam Locomotive) project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[3.1.0] - 2026-07-06
Added
- Surprise mode: a bare
sl(the classic mistypedls) now randomizes the whole show each run — train type, coal-car count, color livery (named themes plus fully random one-offs), and speed, with an occasional whistle (25%), a rare flight (10%), and a very rare crash (5%)
Changed
- Any command-line flag disables surprise mode entirely; explicit options remain fully deterministic and backward compatible
[3.0.0] - 2026-07-06
Added
- Flicker-free double-buffered renderer on the alternate screen — the frame is composed off-screen and emitted as a single write, and your previous terminal contents are restored when the train has passed
- Animated wheels with a 4-frame rotation cycle on every train type
- Particle-based smoke that drifts behind the train and dissipates, with grayscale shading on 256-color terminals
- Coal cars (
-n/--cars, up to 8), adapted from Toyoda Masashi's original sl - Train type selection flag (
-t/--type: classic, small, d51, c51) - Whistle (
-w/--whistle) — the train toots as it passes - Rebuilt accident mode: screen shake, spark shower, and smoldering wreck
- Rebuilt flying mode: smoothstep climb with stardust trail
- Static train output when stdout is not a terminal, so
sl | catprints a train instead of escape codes - Color control:
--no-colorflag,NO_COLORenvironment variable honored - Monotonic frame pacing (animation speed no longer drifts with render time)
- Speed clamping (0.1–20.0) so
-s 0can no longer hang the animation - Professional project documentation (CONTRIBUTING.md, etc.)
- Enhanced README with badges and comprehensive information
- Links to StevenMilanese.com throughout documentation
Changed
-l/--longnow couples two coal cars behind the D51, making the long train actually long- Terminal resize is applied at the next frame instead of mid-draw
- SIGWINCH handler is only registered on platforms that have it (Windows compatibility)
Fixed
- Full-screen clear per frame caused visible flicker; replaced by the double-buffered renderer
- Character-by-character color replacement could corrupt output when the train was clipped at the screen edge
- Escape codes were written even when stdout was a pipe or file
- Flying mode drifted downward instead of flying
- Degenerate terminal sizes (0×0 pseudo-terminals) now fall back to 80×24
[2.0.0] - 2024-06-05
Added
- Complete rewrite as a standalone Python script
- Multiple train types (Classic, D51, C51)
- Flying mode (
-Fflag) - Accident mode (
-aflag) - Speed control (
-soption) - Colorful ASCII art with ANSI escape sequences
- Dynamic smoke generation
- Terminal resize handling (SIGWINCH)
- Graceful interrupt handling (SIGINT)
- Comprehensive help system
- No external dependencies (pure Python)
Changed
- Migrated from simple script to professional command-line tool
- Improved animation smoothness
- Better terminal compatibility
Removed
- Dependency on colorama (now uses built-in ANSI codes)
[1.0.0] - 2024-06-01
Added
- Initial release
- Basic train animation
- Simple colorful output using colorama
- Right-to-left animation
For more information, visit StevenMilanese.com