mdisk: Delete unnecessary use of `strip_diskname` and use it elsewhere
[sunny256-utils.git] / Div / unfinished / svnstat
blob47fa901687cfb58cf4331b1eaaebf319ee8c6853
1 #!/usr/bin/env perl
3 #=======================================================================
4 # $Id$
5 # Generates statistics from a Subversion repository.
7 # Character set: UTF-8
8 # ©opyleft 2004– Øyvind A. Holm <sunny@sunbase.org>
9 # License: GNU General Public License, see end of file for legal stuff.
10 #=======================================================================
12 use strict;
13 use warnings;
14 use Getopt::Long;
16 $| = 1;
18 our ($opt_help) =
19 ( 0);
21 my $VERSION = "0.0.0";
23 our $progname = $0;
24 $progname =~ s#^.*/(.*?)$#$1#;
26 my $rcs_id = '$Id$';
27 my $id_date = $rcs_id;
28 $id_date =~ s/^.*?\d+ (\d\d\d\d-.*?\d\d:\d\d:\d\d\S+).*/$1/;
30 Getopt::Long::Configure("bundling");
31 GetOptions(
32 "help|h" => \$opt_help
33 ) || die("$progname: Option error. Use -h for help.\n");
35 $opt_help && usage(0);
37 while (<>) {
38 print;
41 sub usage {
42 # Send the help message to stdout {{{
43 my $Retval = shift;
44 print(<<END);
46 $progname v$VERSION -- $id_date
48 Usage: $progname [options] [file [files [...]]]
50 Options:
52 -h, --help Show this help.
54 END
55 exit($Retval);
56 # }}}
59 __END__
61 # Plain Old Documentation (POD) {{{
63 =pod
65 =head1 NAME
67 svnstat
69 =head1 REVISION
71 $Id$
73 =head1 SYNOPSIS
75 svnstat [options] [[file|dir|URL] ...]]
77 =head1 DESCRIPTION
79 Generates various statistics from a Subversion repository.
81 =head1 OPTIONS
83 (Not implemented yet, only drafts.)
85 =over 4
87 =item B<--author> x
89 Use only data from author x. Can be repeated.
91 =item B<-h>, B<--help>
93 Print a brief help summary.
95 =item B<--commits-per> timespec
97 Generate a curve with the number of commits per I<timespec>.
98 Valid strftime(3)-like modifiers:
100 =over 4
102 =item B<y>
104 year
106 =item B<m>
108 month
110 =item B<w>
112 week
114 =item B<d>
118 =item B<H>
120 hour
122 =item B<M>
124 minute
126 =item B<S>
128 second
130 |1d|1h|2h|4w|1m|2y
132 =back
135 =back
137 =head1 BUGS
139 No code, no bugs.
141 =head1 AUTHOR
143 Made by Øyvind A. Holm S<E<lt>sunny _AT_ sunbase.orgE<gt>>.
145 =head1 COPYRIGHT
147 Copyleft © Øyvind A. Holm &lt;sunny@sunbase.org&gt;
148 This is free software; see the file F<COPYING> for legalese stuff.
150 =head1 LICENCE
152 This program is free software; you can redistribute it and/or modify it
153 under the terms of the GNU General Public License as published by the
154 Free Software Foundation; either version 2 of the License, or (at your
155 option) any later version.
157 This program is distributed in the hope that it will be useful, but
158 WITHOUT ANY WARRANTY; without even the implied warranty of
159 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
160 See the GNU General Public License for more details.
162 You should have received a copy of the GNU General Public License along
163 with this program; if not, write to the Free Software Foundation, Inc.,
164 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
166 =head1 SEE ALSO
168 =cut
170 # }}}
172 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
173 # End of file $Id$