1 unstable release
0.1.0 | Apr 16, 2023 |
---|
#2192 in Parser implementations
32KB
851 lines
iReal Parser
ireal_parser
is a library that provides functionality to parse iReal Pro URLs
and chord progressions according to the iReal Pro
specification.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
lib.rs
:
iReal Parser
ireal_parser
is a library that provides functionality to parse iReal Pro
URLs and chord progressions according to the iReal Pro
specification.
Features
- Parse iReal Pro URLs into a
Song
struct with fields like title, composer, style, and key signature. - Parse iReal Pro progressions into a
Progression
struct containingProgressionElement
s. - Convert
Song
,Progression
, andProgressionElement
structs back to iReal Pro URL and progression string formats.
Usage
Add ireal_parser
as a dependency in your Cargo.toml
, then use the
parsing functions provided by the crate:
use ireal_parser::parse_irealbook_url;
// Parse an iReal Pro URL into a `Song` struct
let song = parse_irealbook_url("irealbook://Song Title=LastName FirstName=Style=Ab=n=T44*A{C^7 |A-7 |D-9 |G7#5 }").unwrap();
For more information, refer to the iReal Pro specification.
Dependencies
~2.2–3MB
~55K SLoC