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

Download history 21/week @ 2024-09-18 34/week @ 2024-09-25 12/week @ 2024-10-02 11/week @ 2024-10-09 10/week @ 2024-10-16 10/week @ 2024-10-23 22/week @ 2024-10-30 11/week @ 2024-11-06 32/week @ 2024-11-13 28/week @ 2024-11-20 172/week @ 2024-11-27 93/week @ 2024-12-04 141/week @ 2024-12-11 59/week @ 2024-12-18 4/week @ 2024-12-25 24/week @ 2025-01-01

243 downloads per month

MIT license

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