App-Changelog
view release on metacpan or search on metacpan
lib/App/Changelog.pm view on Meta::CPAN
@tags = grep { /^$self->{filter_tag}/ } @tags;
if ( !@tags ) {
die "Error: No tags matching the filter '$self->{filter_tag}'.\n";
}
}
return @tags;
}
sub _run_git_command {
my ( $self, $command ) = @_;
my $output = `$command`;
chomp $output;
return $output;
}
sub _write_to_file {
my ( $self, $content ) = @_;
open( my $fh, '>', $self->{output_file} )
or die "Could not open $self->{output_file}: $!";
print $fh $content;
close($fh);
}
1;
__END__
=encoding utf-8
=head1 NAME
changelog - Simple command-line CHANGELOG.md generator written in Perl
=head1 SYNOPSIS
changelog [options]
=head1 DESCRIPTION
This command-line tool written in Perl for automatically generating changelogs based on Git commit history. It allows you to create detailed or compact logs, filter specific tags, and save the changelog to a file.
=head1 EXAMPLES
To generate a changelog in compact mode (default):
changelog
To save the changelog to a specific file:
changelog --output changelog.md
To generate detailed logs:
changelog --no-compact
To filter commits by tags starting with "v":
changelog --filter v
=head1 ERRORS
If there is an error during any operation (such as adding, editing, or removing passwords), an error message will be displayed indicating the issue.
=head1 AUTHOR
Luiz Felipe de Castro Vilas Boas <luizfelipecastrovb@gmail.com>
=head1 LICENSE
This module is released under the MIT License. See the LICENSE file for more details.
=cut
( run in 0.658 second using v1.01-cache-2.11-cpan-524268b4103 )