{"id":21585987,"url":"https://github.com/magiclen/lrc","last_synced_at":"2025-04-10T20:14:44.018Z","repository":{"id":62442501,"uuid":"253465262","full_name":"magiclen/lrc","owner":"magiclen","description":"A pure Rust implementation of LyRiCs which is a computer file format that synchronizes song lyrics with an audio file.","archived":false,"fork":false,"pushed_at":"2024-04-06T11:44:33.000Z","size":35,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T17:55:17.310Z","etag":null,"topics":["lyrics","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magiclen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-06T10:31:19.000Z","updated_at":"2024-04-04T14:45:26.000Z","dependencies_parsed_at":"2022-11-01T22:01:06.617Z","dependency_job_id":null,"html_url":"https://github.com/magiclen/lrc","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Flrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Flrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Flrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Flrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclen","download_url":"https://codeload.github.com/magiclen/lrc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288400,"owners_count":21078904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lyrics","rust"],"created_at":"2024-11-24T15:12:19.855Z","updated_at":"2025-04-10T20:14:43.993Z","avatar_url":"https://github.com/magiclen.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"LRC\n====================\n\n[![CI](https://github.com/magiclen/lrc/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/lrc/actions/workflows/ci.yml)\n\nA pure Rust implementation of LyRiCs which is a computer file format that synchronizes song lyrics with an audio file.\n\n## Examples\n\n```rust\nuse lrc::{Lyrics, IDTag, TimeTag};\n\nlet mut lyrics = Lyrics::new();\n\nlet metadata = \u0026mut lyrics.metadata;\nmetadata.insert(IDTag::from_string(\"ti\", \"Let's Twist Again\").unwrap());\nmetadata.insert(IDTag::from_string(\"al\", \"Hits Of The 60's - Vol. 2 – Oldies\").unwrap());\n\nlyrics.add_timed_line(TimeTag::from_str(\"00:12.00\").unwrap(), \"Naku Penda Piya-Naku Taka Piya-Mpenziwe\").unwrap();\nlyrics.add_timed_line(TimeTag::from_str(\"00:15.30\").unwrap(), \"Some more lyrics\").unwrap();\n\n\nassert_eq!(\n    r\"[al: Hits Of The 60's - Vol. 2 – Oldies]\n[ti: Let's Twist Again]\n\n[00:12.00]Naku Penda Piya-Naku Taka Piya-Mpenziwe\n[00:15.30]Some more lyrics\",\n    lyrics.to_string()\n);\n```\n\n```rust\nuse lrc::{Lyrics, TimeTag};\n\nlet lyrics = Lyrics::from_str(r\"[00:12.00][01:15.00]Naku Penda Piya-Naku Taka Piya-Mpenziwe\n[00:15.30][01:18.00]Some more lyrics ...\").unwrap();\n\nif let Some(index) = lyrics.find_timed_line_index(TimeTag::from_str(\"00:13.00\").unwrap()) {\n    let timed_lines = lyrics.get_timed_lines();\n\n    assert_eq!((TimeTag::from_str(\"00:12.00\").unwrap(), \"Naku Penda Piya-Naku Taka Piya-Mpenziwe\".into()), timed_lines[index]);\n} else {\n    unreachable!();\n}\n```\n\n## Crates.io\n\nhttps://crates.io/crates/lrc\n\n## Documentation\n\nhttps://docs.rs/lrc\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Flrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclen%2Flrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Flrc/lists"}