Crate ireal_parser
source ·Expand description
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.
Structs
- Represents an iReal Pro chord
- Represents a chord progression as a sequence of
ProgressionElement
s. - Represents a song with an iReal Pro progression.
- Represents some staff text
Enums
- Represents an iReal Pro chord quality
- Represents errors that can occur while parsing iReal Pro URLs and progressions.
- Represents an iReal Pro note
- Represents a single element of a chord progression.
- Represents a staff text
- Represents the time signatures
Functions
- Parses an iReal Pro progression string and returns a
Progression
. - Parses an iReal Pro URL and returns a
Song
.