--- /dev/null
+Gitalist - a transitional project to convert gitweb.cgi to a Catalyst app.
+
+The idea behind this project is to move gitweb.cgi away from a single
+monolithic CGI script and into a modern Catalyst app. Fortunately this is not
+as daunting as it might seem at first as gitweb.cgi follows an MVC type
+structure. Once gitweb.cgi has been suitably Catalysed then it can move from
+being a "this was once gitweb.cgi" to a project of its own (hence the
+"transitional" in the description).
+
+As it stands Gitalist is very much in its infancy and hasn't got far
+beyond a layout template and a single controller. Probably the next step is
+moving an existing action into a new Catalyst action and lay down the code
+to make porting further actions, or writing new ones, as simple as possible.
+After that provide a model based on one of the git modules, either the Git.pm
+that comes with git or Git::PurePerl, and deprecate or port the existing
+gitweb.cgi functions.
+
+DEPENDENCIES
+
+ Catalyst
+ IO::Capture::Stdout;
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2009 Venda Ltd
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.8.8 or,
+at your option, any later version of Perl 5 you may have available.
# core git executable to use
# this can just be "git" if your webserver has a sensible PATH
- our $GIT = "/home/dbrook/apps/bin/git";
+ our $GIT = "/usr/bin/git";
# absolute fs-path which will be prepended to the project path
our $projectroot = "/pub/scm";
our $home_link = $my_uri || "/";
# string of the home link on top of all pages
- our $home_link_str = "DanB's git repos";
+ our $home_link_str = "Project Gitalist";
# name of your site or organization to appear in page titles
# replace this with something more descriptive for clearer bookmarks
if (-e $GITWEB_CONFIG) {
do $GITWEB_CONFIG;
} else {
- our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || '/home/dbrook/dev/gitweb/gitweb.conf';
+ our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || '../../gitweb.conf';
do $GITWEB_CONFIG_SYSTEM if -e $GITWEB_CONFIG_SYSTEM;
}
## functions printing HTML: header, footer, error page
sub git_header_html {
- # XXX I don't these are used here ...
+ # XXX These aren't used, how odd.
my $status = shift || "200 OK";
my $expires = shift;
$args{'hash'} = $hash if $hash;
$args{'hash_base'} = $hash_base if $hash_base;
- print "<div class=\"header\">\n" .
+ print q[<div class="header">],
$cgi->a({-href => href(%args), -class => "title"},
- $title ? $title : $action) .
- "\n</div>\n";
+ $title ? $title : $action),
+ q[</div>];
}
-#sub git_print_authorship (\%) {
sub git_print_authorship {
my $co = shift;