2 releases
0.1.1 | Mar 23, 2024 |
---|---|
0.1.0 | Mar 23, 2024 |
#29 in #spinner
24KB
299 lines
Yet Another Spinner Lib
easy to use cli animation lib based on crossterm
Do you often find yourself gazing into the void of your terminal, wondering if your computer has decided to take a coffee break without notifying you?
Introducing
After countless late nights (1) spent wrestling with terminal buffers and ASCII art, after enduring more trial and error than we care to admit, we proudly present to you our humble attempt to transform loading animations from a headache into a delight
How to Use?
It's as easy as pie (or maybe even easier, depending on your pie-making skills)! Just follow these simple steps:
use animations_rs::{spinner::PreDefined, LoadingAnimation};
fn scope_example() {
// create a LoadingAnimation instance using one of the predefined animations
let _loading_animation = LoadingAnimation::new(PreDefined::dot_spinner1(false)); // invert frames bool (false)
// `loading_animation` will run out of scope now and get dropped,
// thus the animation will stop and remove itself from the console
}
But wait, there's more! We're cooking up some extra features, like the ability to have multiple animations simultaneously and the power to delete specific ones.
Disclaimer
Now, we won't promise you that cli_loading_magic will solve all your problems. We can't guarantee it won't crash your terminal or cause your computer to sprout legs and walk away in protest. But hey, life's an adventure, right? Embrace the chaos, enjoy the ride, and remember: if all else fails, there's always Ctrl+C.
Feel free to create an issue with suggestions or bug reports.
Credits
This project wouldn't have been possible without the amazing work of the following projects:
Animations
These projects not only provided delightful animations but also spared me from the arduous task of creating frames myself (who wants to do that anyway?)
Documentation
Dependencies
License
This project is licensed under the DWFYW License.
For more information, see the LICENSE file.
Dependencies
~0.8–5.5MB
~20K SLoC