App-Music-ChordPro
view release on metacpan or search on metacpan
- !ChordPro functionality
- Add PDF outlines (bookmarks).
- Revamp table of contents (finally).
- Remove section handling (we now have labels).
- Allow ~ expansion in file names.
- Allow relaxed parsing of chords (root name + arbitrary).
- Allow parsing of notes (chords with only a lc root name).
- (Wx) Show filename in window title.
- (Wx) Show asterisk if file is modified.
- !ChordPro configuration
- Add split marker to be inserted between text phrases when the
chord is wider than the phrase.
- Add settings.suppress-empty-lyrics to suppress blank lyrics lines.
- Add display property to chords to control the way they are displayed.
- Add guitar-br.json with Brandt-Roemer compliant chord symbols.
- Add meta variable songindex.
- Add metadata sorttitle.
- Add config settings for HTML backend.
- Add font properties in fontconfig settings.
- Add settings for chordnames and notenames.
- !Bugfixes
lib/ChordPro/Output/PDF/Song.pm view on Meta::CPAN
else {
my $xt1;
if ( $phrase =~ /^\s+$/ ) {
$xt1 = $xt0 + length($phrase) * $pr->strwidth(" ",$ftext);
# $xt1 = $pr->text( "n" x length($phrase), $xt0, $ytext, $ftext );
}
else {
$xt1 = $pr->text( $phrase, $x, $ytext, $ftext );
}
if ( $xt0 > $xt1 ) { # chord is wider
# Do we need to insert a split marker?
if ( $i < $n
&& demarkup($phrase) !~ /\s$/
&& demarkup($phrases[$i+1]) !~ /^\s/
# And do we have one?
&& ( my $marker = $ps->{'split-marker'} ) ) {
# Marker has 3 parts: start, repeat, and final.
# final is always printed, last.
# start is printed if there is enough room.
# repeat is printed repeatedly to fill the rest.
lib/ChordPro/Song.pm view on Meta::CPAN
$self->{chordsinfo}->{$new_id} = $info->new($info);
return $new_id;
}
sub define_chord {
my ( $self, $dir, $args ) = @_;
# Split the arguments and keep a copy for error messages.
# Note that quotewords returns an empty result if it gets confused,
# so fall back to the ancient split method if so.
$args =~ s/^\s+//;
$args =~ s/\s+$//;
my @a = quotewords( '[: ]+', 0, $args );
@a = split( /[: ]+/, $args ) unless @a;
my @orig = @a;
my $show = $dir eq "chord";
my $fail = 0;
my $name = shift(@a);
my $strings = $config->diagram_strings;
( run in 2.148 seconds using v1.01-cache-2.11-cpan-bbcb1afb8fc )