chord_pro 0.4.0
chord_pro: ^0.4.0 copied to clipboard
A Dart parser for the ChordPro 6 song format. Extracts chords, lyrics, metadata, comments, layout hints and chord diagrams.
0.4.0 #
Spec-compliance pass against the ChordPro reference parser.
- Breaking: the canonical negation form is now postfix
!—{name-sel!}— matching the ChordPro spec and the reference Perl parser (s/\!$//).Directive.toStringemits this form. The previous prefix{name-!sel}and legacy{name+sel}forms continue to be accepted on input for backward compatibility but are now flagged as non-spec. - Conditional selectors now gate all directives, not just metadata
and formatting. Sections with an inactive selector skip their entire
body (lines, nested directives, and the section end), per spec
("selection applies to everything in the section, up to and including
the final section end directive"). Comments, images, layout breaks,
chorus recalls, and
{define}/{chord}definitions are likewise suppressed when their selector polarity does not match. - Add the spec-listed chord qualifiers
^(alternate formaj),h(half-diminished), and0(diminished, literal zero). The pre-existingø/°glyphs remain as documented non-spec extensions. - Add ChordPro 6.01 scanner features:
\-terminated line continuation (with leading whitespace stripped from the next line) and\uXXXXUnicode escapes anywhere in the source. - Document explicitly which features are non-spec extensions of this
parser (German
H, unicode accidentals,ø/°,NC/N.C./N.C, bracket-escapes, mid-lyric directives, legacy selector forms) and which spec features are not yet covered (label="…"parsing, Pango markup,{define}format strings).
0.3.0 #
- Add
selectors:argument toChordPro.parse/parseSongso callers can activate conditional directives. The same set is forwarded toreduceFormatting, which now honours selector polarity. Matching is case-insensitive. Directive.toStringemits a postfix!for negative polarity instead of the legacy+selform.- Drop the unused
collectiondependency.
0.2.0 #
- Skip
#file-comment lines per spec. - Add
sortartistandtagmetadata fields. - Accept spec-form
{name-!sel: …}selector negation alongside the legacy+selform. - Emit
{comment}/{comment_italic}(ci) /{comment_box}(cb) /{highlight}asLine.commententries. - Parse
{image: …}into a typedImageDirectiveexposed asLine.imageentries. - Add
Chord.transpose,Song.transposed, andmetadata.transpose. - Recognise
{new_page}/{new_physical_page}/{column_break}asLine.layoutBreakentries; capture{columns}/{col}asmetadata.columns. - Add
svgandtextblockverbatim section kinds. - Reduce font/size/colour directives into
Song.formatting(FormattingSettingskeyed by target). - Recognise
x_*custom-extension directives viaDirective.isCustomExtensionandSong.customExtensions. - Extend the chord parser to handle German
H, unicode♯/♭, minor variants (mi,-), half-diminishedø, diminished°, andNC/N.C.no-chord markers.
0.1.0 #
- Intial