git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: suggest name for OPML view
@ 2009-01-02 12:49 Giuseppe Bilotta
  2009-01-06  8:18 ` Junio C Hamano
  2009-01-10 14:10 ` Jakub Narebski
  0 siblings, 2 replies; 5+ messages in thread
From: Giuseppe Bilotta @ 2009-01-02 12:49 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski, Petr Baudis, Junio C Hamano, Giuseppe Bilotta

Suggest opml.xml as name for OPML view by providing the appropriate
header, consistently with similar usage in project_index view.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
 gitweb/gitweb.perl |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b164001..995bc1a 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6122,7 +6122,11 @@ sub git_atom {
 sub git_opml {
 	my @list = git_get_projects_list();
 
-	print $cgi->header(-type => 'text/xml', -charset => 'utf-8');
+	print $cgi->header(
+		-type => 'text/xml',
+		-charset => 'utf-8',
+		-content_disposition => 'inline; filename="opml.xml"');
+
 	print <<XML;
 <?xml version="1.0" encoding="utf-8"?>
 <opml version="1.0">
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gitweb: suggest name for OPML view
  2009-01-02 12:49 [PATCH] gitweb: suggest name for OPML view Giuseppe Bilotta
@ 2009-01-06  8:18 ` Junio C Hamano
  2009-01-10 14:10 ` Jakub Narebski
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2009-01-06  8:18 UTC (permalink / raw)
  To: Giuseppe Bilotta; +Cc: git, Jakub Narebski, Petr Baudis

Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:

> Suggest opml.xml as name for OPML view by providing the appropriate
> header, consistently with similar usage in project_index view.
>
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>

I think this makes sense; will apply unless there is any objection.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gitweb: suggest name for OPML view
  2009-01-02 12:49 [PATCH] gitweb: suggest name for OPML view Giuseppe Bilotta
  2009-01-06  8:18 ` Junio C Hamano
@ 2009-01-10 14:10 ` Jakub Narebski
  2009-01-10 19:15   ` Giuseppe Bilotta
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Narebski @ 2009-01-10 14:10 UTC (permalink / raw)
  To: Giuseppe Bilotta; +Cc: git, Petr Baudis, Junio C Hamano

On Fri, 2 Jan 2009, Giuseppe Bilotta wrote:

> Suggest opml.xml as name for OPML view by providing the appropriate
> header, consistently with similar usage in project_index view.

It is not name for a view, but more of default filename when saving
it. While it is good idea to have consistency, I guess that while
'project_index' view and other non-HTML views are meant to be 
downloaded and saved (snapshots, patches, patchsets), OPML view
is meant to be used on-line, just like web feeds in RSS and Atom
formats which are non-HTML too but do not have Content-Disposition
header set. 

But I do not use OPML. Anyone?

> 
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
> ---
>  gitweb/gitweb.perl |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index b164001..995bc1a 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -6122,7 +6122,11 @@ sub git_atom {
>  sub git_opml {
>  	my @list = git_get_projects_list();
>  
> -	print $cgi->header(-type => 'text/xml', -charset => 'utf-8');
> +	print $cgi->header(
> +		-type => 'text/xml',
> +		-charset => 'utf-8',
> +		-content_disposition => 'inline; filename="opml.xml"');
> +
>  	print <<XML;
>  <?xml version="1.0" encoding="utf-8"?>
>  <opml version="1.0">
> -- 
> 1.5.6.5
> 
> 

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gitweb: suggest name for OPML view
  2009-01-10 14:10 ` Jakub Narebski
@ 2009-01-10 19:15   ` Giuseppe Bilotta
  2009-01-10 19:45     ` Jakub Narebski
  0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Bilotta @ 2009-01-10 19:15 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git, Petr Baudis, Junio C Hamano

On Sat, Jan 10, 2009 at 9:10 AM, Jakub Narebski <jnareb@gmail.com> wrote:
> On Fri, 2 Jan 2009, Giuseppe Bilotta wrote:
>
>> Suggest opml.xml as name for OPML view by providing the appropriate
>> header, consistently with similar usage in project_index view.
>
> It is not name for a view, but more of default filename when saving
> it. While it is good idea to have consistency, I guess that while
> 'project_index' view and other non-HTML views are meant to be
> downloaded and saved (snapshots, patches, patchsets), OPML view
> is meant to be used on-line, just like web feeds in RSS and Atom
> formats which are non-HTML too but do not have Content-Disposition
> header set.

OPML is used for import/export of RSS feed lists between aggregators
(e.g. moving your reading list from knewsreader to google reader). As
such, it can also be comfortable to save it to disk for import by some
tools. IMO, of course. And there's also the consistency thing, and not
actual reason _not_ to offer the filename, since it comes pretty
cheap.

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gitweb: suggest name for OPML view
  2009-01-10 19:15   ` Giuseppe Bilotta
@ 2009-01-10 19:45     ` Jakub Narebski
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Narebski @ 2009-01-10 19:45 UTC (permalink / raw)
  To: Giuseppe Bilotta; +Cc: git, Petr Baudis, Junio C Hamano

Giuseppe Bilotta wrote:
> On Sat, Jan 10, 2009 at 9:10 AM, Jakub Narebski <jnareb@gmail.com> wrote:
>> On Fri, 2 Jan 2009, Giuseppe Bilotta wrote:
>>
>>> Suggest opml.xml as name for OPML view by providing the appropriate
>>> header, consistently with similar usage in project_index view.
>>
>> It is not name for a view, but more of default filename when saving
>> it. While it is good idea to have consistency, I guess that while
>> 'project_index' view and other non-HTML views are meant to be
>> downloaded and saved (snapshots, patches, patchsets), OPML view
>> is meant to be used on-line, just like web feeds in RSS and Atom
>> formats which are non-HTML too but do not have Content-Disposition
>> header set.
> 
> OPML is used for import/export of RSS feed lists between aggregators
> (e.g. moving your reading list from knewsreader to google reader). As
> such, it can also be comfortable to save it to disk for import by some
> tools. IMO, of course. [...]

If it is used in such way, then I am all for it (and of course for
consistency with 'projects_index' view).

Acked-by: Jakub Narebski <jnareb@gmail.com>

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-10 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-02 12:49 [PATCH] gitweb: suggest name for OPML view Giuseppe Bilotta
2009-01-06  8:18 ` Junio C Hamano
2009-01-10 14:10 ` Jakub Narebski
2009-01-10 19:15   ` Giuseppe Bilotta
2009-01-10 19:45     ` Jakub Narebski

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).