9 releases
0.2.0 | Dec 16, 2024 |
---|---|
0.1.8 | Dec 1, 2024 |
0.1.6 | Mar 29, 2024 |
0.1.5 | Feb 4, 2024 |
0.1.2 | May 14, 2022 |
#353 in Audio
243 downloads per month
18KB
202 lines
lyric-finder
Lyric finder is a simple rust API that allows you to search for lyrics of a song by its title and artist. It uses the Genius API to fetch the lyrics. This project was originally part of spotify-player, a terminal based spotify client written in rust. It was forked primarily for use in my discord bot CrackTunes.
Usage
See the examples directory for usage examples.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Releases
cargo bump
git commit -S -am "chore: release vX.X.X"
cargo release --sign-tag --sign-commit --execute
lib.rs
:
lyric_finder
This crate provides a Client
struct for retrieving a song's lyric.
It ultilizes the Genius website and its APIs to get lyric data.
Example
#
let client = lyric_finder::Client::new();
let result = client.get_lyric("shape of you").await?;
match result {
lyric_finder::LyricResult::Some {
track,
artists,
lyric,
} => {
println!("{} by {}'s lyric:\n{}", track, artists, lyric);
}
lyric_finder::LyricResult::None => {
println!("lyric not found!");
}
}
Dependencies
~6–17MB
~233K SLoC