* [PATCH] gitweb: Show project's README.html if available
@ 2006-10-24 3:23 Petr Baudis
2006-10-24 8:43 ` Luben Tuikov
0 siblings, 1 reply; 7+ messages in thread
From: Petr Baudis @ 2006-10-24 3:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
If the repository includes a README.html file, show it in the summary page.
The usual "this should be in the config file" argument does not apply here
since this can be larger and having such a big string in the config file
would be impractical.
I don't know if this is suitable upstream, but it's one of the repo.or.cz
custom modifications that I've thought could be interesting for others
as well.
Compared to the previous patch, this adds the '.html' extension to the
filename, so that it's clear it is, well, HTML.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
gitweb/gitweb.perl | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3b26ec3..81adc71 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2538,6 +2538,14 @@ sub git_summary {
}
print "</table>\n";
+ if (-s "$projectroot/$project/README.html") {
+ if (open my $fd, "$projectroot/$project/README.html") {
+ print "<div class=\"title\">readme</div>\n";
+ print $_ while (<$fd>);
+ close $fd;
+ }
+ }
+
open my $fd, "-|", git_cmd(), "rev-list", "--max-count=17",
git_get_head_hash($project)
or die_error(undef, "Open git-rev-list failed");
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] gitweb: Show project's README.html if available
2006-10-24 3:23 [PATCH] gitweb: Show project's README.html if available Petr Baudis
@ 2006-10-24 8:43 ` Luben Tuikov
2006-10-24 11:30 ` Petr Baudis
0 siblings, 1 reply; 7+ messages in thread
From: Luben Tuikov @ 2006-10-24 8:43 UTC (permalink / raw)
To: Petr Baudis, Junio C Hamano; +Cc: git
--- Petr Baudis <pasky@suse.cz> wrote:
> If the repository includes a README.html file, show it in the summary page.
> The usual "this should be in the config file" argument does not apply here
> since this can be larger and having such a big string in the config file
> would be impractical.
>
> I don't know if this is suitable upstream, but it's one of the repo.or.cz
> custom modifications that I've thought could be interesting for others
> as well.
>
> Compared to the previous patch, this adds the '.html' extension to the
> filename, so that it's clear it is, well, HTML.
>
> Signed-off-by: Petr Baudis <pasky@suse.cz>
> ---
Why not instead re-submit a patch implementing what was discussed
in this thread bearing the same name:
http://marc.theaimsgroup.com/?t=116044914900001&r=1&w=2
Luben
>
> gitweb/gitweb.perl | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 3b26ec3..81adc71 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -2538,6 +2538,14 @@ sub git_summary {
> }
> print "</table>\n";
>
> + if (-s "$projectroot/$project/README.html") {
> + if (open my $fd, "$projectroot/$project/README.html") {
> + print "<div class=\"title\">readme</div>\n";
> + print $_ while (<$fd>);
> + close $fd;
> + }
> + }
> +
> open my $fd, "-|", git_cmd(), "rev-list", "--max-count=17",
> git_get_head_hash($project)
> or die_error(undef, "Open git-rev-list failed");
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gitweb: Show project's README.html if available
2006-10-24 8:43 ` Luben Tuikov
@ 2006-10-24 11:30 ` Petr Baudis
2006-10-24 19:09 ` Luben Tuikov
0 siblings, 1 reply; 7+ messages in thread
From: Petr Baudis @ 2006-10-24 11:30 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Junio C Hamano, git
Dear diary, on Tue, Oct 24, 2006 at 10:43:08AM CEST, I got a letter
where Luben Tuikov <ltuikov@yahoo.com> said that...
> --- Petr Baudis <pasky@suse.cz> wrote:
> > If the repository includes a README.html file, show it in the summary page.
> > The usual "this should be in the config file" argument does not apply here
> > since this can be larger and having such a big string in the config file
> > would be impractical.
> >
> > I don't know if this is suitable upstream, but it's one of the repo.or.cz
> > custom modifications that I've thought could be interesting for others
> > as well.
> >
> > Compared to the previous patch, this adds the '.html' extension to the
> > filename, so that it's clear it is, well, HTML.
> >
> > Signed-off-by: Petr Baudis <pasky@suse.cz>
> > ---
>
> Why not instead re-submit a patch implementing what was discussed
> in this thread bearing the same name:
>
> http://marc.theaimsgroup.com/?t=116044914900001&r=1&w=2
This implements
http://marc.theaimsgroup.com/?l=git&m=116047939517299&w=2
I see no other ideas I could take there except various naming proposals
and perhaps using File::Copy but I'll wait until someone does a
gitweb-wide change for the latter.
I don't really care _what_ name it bears, but I'd like to have it
included. :-)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gitweb: Show project's README.html if available
2006-10-24 11:30 ` Petr Baudis
@ 2006-10-24 19:09 ` Luben Tuikov
2006-10-24 19:19 ` Petr Baudis
0 siblings, 1 reply; 7+ messages in thread
From: Luben Tuikov @ 2006-10-24 19:09 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
--- Petr Baudis <pasky@suse.cz> wrote:
> > Why not instead re-submit a patch implementing what was discussed
> > in this thread bearing the same name:
> >
> > http://marc.theaimsgroup.com/?t=116044914900001&r=1&w=2
>
> This implements
>
> http://marc.theaimsgroup.com/?l=git&m=116047939517299&w=2
>
> I see no other ideas I could take there except various naming proposals
> and perhaps using File::Copy but I'll wait until someone does a
> gitweb-wide change for the latter.
>
> I don't really care _what_ name it bears, but I'd like to have it
> included. :-)
People have suggested that this functionality be folded into the
"Description" column, where the description printed is the
first line of the description file "description" and if clicked
on, it shows the whole "descrption" file.
Luben
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gitweb: Show project's README.html if available
2006-10-24 19:09 ` Luben Tuikov
@ 2006-10-24 19:19 ` Petr Baudis
2006-10-24 19:41 ` Luben Tuikov
0 siblings, 1 reply; 7+ messages in thread
From: Petr Baudis @ 2006-10-24 19:19 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Junio C Hamano, git
On Tue, Oct 24, 2006 at 09:09:03PM CEST, Luben Tuikov wrote:
> --- Petr Baudis <pasky@suse.cz> wrote:
> > > Why not instead re-submit a patch implementing what was discussed
> > > in this thread bearing the same name:
> > >
> > > http://marc.theaimsgroup.com/?t=116044914900001&r=1&w=2
> >
> > This implements
> >
> > http://marc.theaimsgroup.com/?l=git&m=116047939517299&w=2
> >
> > I see no other ideas I could take there except various naming proposals
> > and perhaps using File::Copy but I'll wait until someone does a
> > gitweb-wide change for the latter.
> >
> > I don't really care _what_ name it bears, but I'd like to have it
> > included. :-)
>
> People have suggested that this functionality be folded into the
> "Description" column, where the description printed is the
> first line of the description file "description" and if clicked
> on, it shows the whole "descrption" file.
Please look at the mail the mail I referred was a reply to:
http://marc.theaimsgroup.com/?l=git&m=116047773825208&w=2
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gitweb: Show project's README.html if available
2006-10-24 19:19 ` Petr Baudis
@ 2006-10-24 19:41 ` Luben Tuikov
2006-10-24 19:50 ` Petr Baudis
0 siblings, 1 reply; 7+ messages in thread
From: Luben Tuikov @ 2006-10-24 19:41 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
--- Petr Baudis <pasky@suse.cz> wrote:
> On Tue, Oct 24, 2006 at 09:09:03PM CEST, Luben Tuikov wrote:
> > --- Petr Baudis <pasky@suse.cz> wrote:
> > > > Why not instead re-submit a patch implementing what was discussed
> > > > in this thread bearing the same name:
> > > >
> > > > http://marc.theaimsgroup.com/?t=116044914900001&r=1&w=2
> > >
> > > This implements
> > >
> > > http://marc.theaimsgroup.com/?l=git&m=116047939517299&w=2
> > >
> > > I see no other ideas I could take there except various naming proposals
> > > and perhaps using File::Copy but I'll wait until someone does a
> > > gitweb-wide change for the latter.
> > >
> > > I don't really care _what_ name it bears, but I'd like to have it
> > > included. :-)
> >
> > People have suggested that this functionality be folded into the
> > "Description" column, where the description printed is the
> > first line of the description file "description" and if clicked
> > on, it shows the whole "descrption" file.
>
> Please look at the mail the mail I referred was a reply to:
>
> http://marc.theaimsgroup.com/?l=git&m=116047773825208&w=2
I re-read that email. And I also saw what you have at hed.git.
If anything I think we should want to _minimize_ shown material
before the "shortlog" in the "summary" page.
Why?
Well, in a production environment, people often view the "summary" page
to see what has been going on with a project and they are well aware
of what that project is for and/or what it does. It is cumbersome to have
to scroll down each and every time past he annoying "readme", just to see
the first few commits.
Look, your hed.cgi has 7 lines for the description and URL, (as opposed to 4
of next:gitweb.perl) and those already have generous amount of inner-spacing,
making the whole thing extend half the page. This would be annoying in
a production environment.
Now, if you use gitweb as a Web presentation tool of your projects then
this is another story. Then you would want to put colors, graphics, lots
of text here and there, etc, etc.
If we start to include those little things to be supported "optionally",
then we incur bloat to gitweb.
I think what is best to do is to create another script which can show
the fancy-schmancy Web presentation content you want to mix with
with gitweb, and keep gitweb a tool for the enigineer as opposed to
a web presentation application.
That other fancy-schmancy script can keep track of developers,
statistics, bugs, bug counts, etc, etc, as well.
Luben
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gitweb: Show project's README.html if available
2006-10-24 19:41 ` Luben Tuikov
@ 2006-10-24 19:50 ` Petr Baudis
0 siblings, 0 replies; 7+ messages in thread
From: Petr Baudis @ 2006-10-24 19:50 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Junio C Hamano, git
Dear diary, on Tue, Oct 24, 2006 at 09:41:04PM CEST, I got a letter
where Luben Tuikov <ltuikov@yahoo.com> said that...
> I re-read that email. And I also saw what you have at hed.git.
>
> If anything I think we should want to _minimize_ shown material
> before the "shortlog" in the "summary" page.
>
> Why?
>
> Well, in a production environment, people often view the "summary" page
> to see what has been going on with a project and they are well aware
> of what that project is for and/or what it does. It is cumbersome to have
> to scroll down each and every time past he annoying "readme", just to see
> the first few commits.
Yes, I agree that this is valid concern. I've been thinking about
showing readme in parallel with the summary box, do people think that
would fix the issue?
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-10-24 19:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-24 3:23 [PATCH] gitweb: Show project's README.html if available Petr Baudis
2006-10-24 8:43 ` Luben Tuikov
2006-10-24 11:30 ` Petr Baudis
2006-10-24 19:09 ` Luben Tuikov
2006-10-24 19:19 ` Petr Baudis
2006-10-24 19:41 ` Luben Tuikov
2006-10-24 19:50 ` Petr Baudis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).