Optional grouping of projects by category.
PATCH 1/1 Optional grouping of projects by category.
This adds the GITWEB_GROUP_CATEGORIES option which, if enabled, will result in grouping projects by category on the project list page. The category is specified for each project by the $GIT_DIR/category file or the 'category' variable in its configuration file.
The feature is inspired from Sham Chukoury's patch for the XMMS2 gitweb, but has been rewritten for the current gitweb development HEAD.
Thanks to Florian Ragwitz for Perl tips.
---
We used to run a modified gitweb for XMMS2 Git repositories which, among other things, grouped projects by categories. The feature was lost when we caught up with upstream gitweb, but I've rehacked this feature back on top of the current HEAD.
I assume this might be a wanted feature, or at least it was in Jakub's old wishlist he posted on 2006-06-21 02:51:18.
Feedback on the idea and implementation are welcome.
Makefile | 2 + gitweb/README | 11 ++++ gitweb/gitweb.css | 5 ++ gitweb/gitweb.perl | 129 ++++++++++++++++++++++++++++++++++++++-------------- 4 files changed, 112 insertions(+), 35 deletions(-)
Makefile +2 -0
@@ -208,6 +208,7 @@ GITWEB_EXPORT_OK = GITWEB_STRICT_EXPORT = GITWEB_BASE_URL = GITWEB_LIST = +GITWEB_GROUP_CATEGORIES = GITWEB_HOMETEXT = indextext.html GITWEB_CSS = gitweb.css GITWEB_LOGO = git-logo.png
@@ -1145,6 +1146,7 @@ gitweb/gitweb.cgi: gitweb/gitweb.perl -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \ -e 's|++GITWEB_BASE_URL++|$(GITWEB_BASE_URL)|g' \ -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \ + -e 's|++GITWEB_GROUP_CATEGORIES++|$(GITWEB_GROUP_CATEGORIES)|g' \ -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \ -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \ -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
gitweb/README +11 -0
@@ -38,6 +38,11 @@ You can specify the following configuration variables when building GIT: using gitweb" in INSTALL file for gitweb to find out how to generate such file from scan of a directory. [No default, which means use root directory for projects] + * GITWEB_GROUP_CATEGORIES + Groups projects by category on the main projects list page if set + to true. The category of a project is determined by the + $GIT_DIR/category file or the 'category' variable in its + configuration file. [No default / Not set] * GITWEB_EXPORT_OK Show repository only if this file exists (in repository). Only effective if this variable evaluates to true. [No default / Not set]
@@ -188,6 +193,12 @@ not include variables usually directly set during build): full description is available as 'title' attribute (usually shown on mouseover). By default set to 25, which might be too small if you use long project descriptions. + * $projects_list_group_categories + Enables the grouping of projects by category on the project list page. + * $project_list_default_category + Default category for projects for which none is specified. If set + to the empty string, such projects will remain uncategorized and + listed at the top, above categorized projects. * @git_base_url_list List of git base URLs used for URL to where fetch project from, shown in project summary page. Full URL is "$git_base_url/$project".
gitweb/gitweb.css +5 -0
@@ -264,6 +264,11 @@ td.current_head { text-decoration: underline; } +td.category { + padding-top: 1em; + font-weight: bold; +} + table.diff_tree span.file_status.new { color: #008000; }
gitweb/gitweb.perl +94 -35
180 lines not on this page · raw message
Signature · 1 line
1.5.3.7
Quoted 10 lines · Sebastien Cevey
This adds the
GITWEB_GROUP_CATEGORIESoption which, if enabled, will result in grouping projects by category on the project list page. The category is specified for each project by the $GIT_DIR/category file or the 'category' variable in its configuration file.The feature is inspired from Sham Chukoury's patch for the XMMS2 gitweb, but has been rewritten for the current gitweb development HEAD.
Thanks to Florian Ragwitz for Perl tips.
Thanks a lot. I don't know if it is a good time, with git being in feature freeze, and GSoC project about adding caching to gitweb in the works, but I'll take this patch and resend it if needed. I'll try to comment on it soon.
That said, I think that the subject (oneline commit summary) should include 'gitweb', e.g.
"gitweb: Optional grouping of projects by category"
Signature · 3 lines
Jakub Narebski Poland ShadeHawk on #git
Quoted 4 lines · Jakub Narebski
Thanks a lot. I don't know if it is a good time, with git being in feature freeze, and GSoC project about adding caching to gitweb in the works, but I'll take this patch and resend it if needed. I'll try to comment on it soon.
Great, looking forward to that, thanks!
Signature · 1 line
Sébastien Cevey / inso.cc
At Sun, 27 Jul 2008 01:53:43 -0700 (PDT), Jakub Narebski wrote:
Hello,
Quoted 3 lines
Thanks a lot. I don't know if it is a good time, with git being in feature freeze, and GSoC project about adding caching to gitweb in the works, but I'll take this patch and resend it if needed.
I just saw a gitweb feature patch was merged three days ago, so I was wondering if the feature freeze is over? I wanted to ping you and ask if you want me to resend the patch, or if you had time to take a look at it?
Thanks!
Signature · 1 line
Sébastien Cevey / inso.cc