A script to generate Atom feeds for git commit logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Brennen Bearnes c78f2f45cb add Build.PL and move git-feed to a bin dir 6 years ago
bin add Build.PL and move git-feed to a bin dir 6 years ago
Build.PL add Build.PL and move git-feed to a bin dir 6 years ago
COPYING initial commit - import from userland-book 10 years ago
README.pod better docs 10 years ago
sample_feed.xml sample feed 10 years ago

README.pod

=pod

=head1 NAME

git-feed - generate an Atom feed of git commits in the current repository

=head1 SYNOPSIS

git-feed [ B<--project_url=...> ]

=head1 DESCRIPTION

I keep a lot of projects in git, and I like to provide feeds for things I'm
working on. This script wraps git and XML::Atom::SimpleFeed to generate a
basic Atom feed of commits. It tries to use information already available in
the environment, but needs to be given a URL for your project (and probably for
the feed itself).

It can be configured for a given repository by doing something like the
following:

git config feed.projecturl https://p1k3.com/userland-book/
git config feed.url https://p1k3.com/userland-book/feed.xml
echo 'userland: a book about the command line for human beings' > .git/description

I have I<no idea> whether this sort of thing is considered an acceptable use of
git configuration, but it seems to work.

...or you can supply various options on the command line.

B<--project_url=...>

=over

Set a URL for the project.

=back

B<--feed_url=...>

=over

Set an explicit URL for the feed itself.

=back

B<--title=...>

=over

Set an explicit title for the feed. Will otherwise be read from
.git/description, if available.

=back

B<--entries=>I<n>

=over

Explicitly request I<n> entries. Defaults to 10.

=back

B<--author=...>

=over

Explicitly set an author string. Defaults to git config's current idea of
user.name.

=back

=head1 EXAMPLES

git feed --project_url=https://p1k3.com/userland-book/ > feed.xml

=head1 INSTALLING

I'll wrap this in a module and add a build script. For now, install
XML::Atom::SimpleFeed first. I would probably do that either with:

cpanp -i XML::Atom::SimpleFeed

or:

apt-get install libxml-atom-simplefeed-perl

...depending on which one gave me less static on a given system. I don't
really know what I'm doing in the Perl ecosystem any more, though.

=head1 AUTHOR

Brennen Bearnes <bbearnes@gmail.com>

=head1 LICENSE

This utility is free software, licensed under the terms of the GPL, v2.
See COPYING for a complete copy of the license.