threads / patch / 16963

patchgitweb: suggest name for OPML view

Subject: [PATCH] gitweb: suggest name for OPML view

## tl;dr

5 messages between Jan 2, 2009 and Jan 10, 2009. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Giuseppe Bilotta· Jan 2, 2009, 12:49 UTC · lore

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(-)
Show changes to gitweb/gitweb.perl +5 −1
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
Junio C Hamano· Jan 6, 2009, 08:18 UTC · re: Giuseppe Bilotta · lore

Re: [PATCH] gitweb: suggest name for OPML view

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.
Jakub Narebski· Jan 10, 2009, 14:10 UTC · re: Giuseppe Bilotta · lore

Re: [PATCH] gitweb: suggest name for OPML view

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?
Show 27 quoted lines
> 
> 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
Giuseppe Bilotta· Jan 10, 2009, 19:15 UTC · re: Jakub Narebski · lore

Re: [PATCH] gitweb: suggest name for OPML view

On Sat, Jan 10, 2009 at 9:10 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 12 quoted lines
> 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
Jakub Narebski· Jan 10, 2009, 19:45 UTC · re: Giuseppe Bilotta · lore

Re: [PATCH] gitweb: suggest name for OPML view

Giuseppe Bilotta wrote:
Show 18 quoted lines
> 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

← back to recent threads