Code

Opened 7 years ago

Closed 7 years ago

#3958 closed (fixed)

little changes for conformance to ATOM & RSS specs

Reported by: Baptiste <baptiste.goupil@…> Owned by: adrian
Component: contrib.syndication Version: master
Severity: Keywords: rss, atom, feedgenerator
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

A patch for the feedgenerator that adds <lastBuildDate> to RSS feeds (similar to the ATOM <updated>) and <subtitle> to ATOM feeds (similar to the RSS <description>).

Attachments (3)

feedgenerator.diff (1.1 KB) - added by Baptiste <baptiste.goupil@…> 7 years ago.
the patch
feedgenerator.2.diff (623 bytes) - added by Baptiste <baptiste.goupil@…> 7 years ago.
the patch without the atom subtitle
feedgenerator.3.diff (1.7 KB) - added by Baptiste <baptiste.goupil@…> 7 years ago.
And a bonus patch that sets the <subtitle> to the given argument subtitle if it exists or the description if not, since the <subtitle> is almost the description. Nothing is broken, and that allows to use the same code for ATOM & RSS feeds.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by Baptiste <baptiste.goupil@…>

the patch

comment:1 Changed 7 years ago by Simon G. <dev@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 7 years ago by mtredinnick

  • Patch needs improvement set
  • Triage Stage changed from Ready for checkin to Accepted

Subtitle does not have the same meaning as description. So that part of the patch is not appropriate. We already handle the subtitle element for Atom feeds and it's uses the subtitle attribute on the Feed subclass the client writes.

comment:3 Changed 7 years ago by Baptiste <baptiste.goupil@…>

Well, the spec says :
"The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed."
So yes, I think it is the equivalent of <description>.
But anyway, I have just noticed that we could specify the <subtitle> for ATOM feeds - like you said, my mistake -, so I can manage that, but we could do better that two different arguments for a same element...

Changed 7 years ago by Baptiste <baptiste.goupil@…>

the patch without the atom subtitle

comment:4 Changed 7 years ago by Baptiste <baptiste.goupil@…>

  • Patch needs improvement unset

Changed 7 years ago by Baptiste <baptiste.goupil@…>

And a bonus patch that sets the <subtitle> to the given argument subtitle if it exists or the description if not, since the <subtitle> is almost the description. Nothing is broken, and that allows to use the same code for ATOM & RSS feeds.

comment:5 Changed 7 years ago by mtredinnick

It is misleading to use the description element for the subtitle. The subtitle could be used as a description, but need not be, hence they are not identical. If somebody wants to use their description as subtitle in their Atom feed then they can write subtitle=description in their class.

We provide access to the subtitle element already. Two ways to do the same thing is confusing and not the Python way.

A documentation patch to clear up that subtitle is available in Atom feeds would be fine, if you like.

So, patch 2 is accepted, patch 3 is not.

comment:6 Changed 7 years ago by Baptiste <baptiste.goupil@…>

Yes, you are right, that is smarter to have a required argument "description" not used, instead of putting its content in the <subtitle> of which main usage is to contain the description of the feed. But maybe it is the "Python way" you are talking about... Anyway, I won't write any doc about that, because I think this behaviour is stupid and especially because I am not talking a fluently English.

comment:7 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(In [4981]) Fixed #3958 -- Added lastBuildDate element to RSS feeds. Thanks,
baptiste.goupil@….

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.