Re: Pyrss2 plugin version 0.1 released
Wari Wahab <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <1067480586.16621.30.camel@minisync> |
If it's ok, I'm replying to two mails in one :)
On Thu, 2003-10-30 at 03:08, Gordon Weakliem wrote:
> I haven't tried this, but just yesterday I realized that one
> problem with the template system I have is that I can't use
> relative URIs and still pass the feed validator.
Well, a plugin could help to fix the links, and in your flavour file,
one could replace with something like fix_links('body'), or have
something like a $absolute_url_body, created by a postformatter plugin.
Of course no such plugin exists yet.
Right now I'm having that same problem with relative links as well, and
as weblog tool goes, MT and a host of others have the same problem too.
> It would be
> convenient as an author to be able to use relative URIs, but
> have my RSS / Atom renderer make them full URIs (actually, I
> think Atom can use xml:base to get around this).
For relative URLs that starts with '/' is easy to do I guess, but in an
RSS flavour that could be called from anywhere in your blog tree,
relative links such as '../../foo' and even 'foo' have to be generated
at runtime. The problem is even worse if you have an entry in your blog
tree, say '/computers/internet/memes', and you have something that
worked right when you refer to './foo.html' at
http://host/blog/computers/internet/memes, but gets screwed in
http://host/blog, and I don't think I can solve that computationally.
Heheh, let me count your potential problems :)
-----Original Message from Rune Morling <[email protected]>-----
> It doesn't
> look like you're handling this; I suppose you'd have to use
> something like sgmllib to parse the entry and find URIs that
> need fixing.
Nope, not yet, and due to the complexity of the issue, I think that the
extra computation is pointless
> I chose not to implement a new renderer. If this syndication
> business should be done properly, I'd say one would be best off
> implementing a general xml/syndication renderer and then
> subclassing that further to implement rss0.9x, rss1.0,
> rss2.0 and atom feeds. Hope the devs are listening to me
> on this ...
Unfortunately, looking at XML rendering using XML modules looks quite
unrefactorable. And I have no idea if making this allows the users to
plainly change their templates without the need to know python, or
(gasp!) XML processing.
> But then again, that might just be rubbish - what do I know?
I'm all for inputs on this one, but I believe that it could be a futile
experiment. I'm too young in python to know XML generation the 'easy'
way.
> Instead, my plugin is a somewhat dirty hack based on good old
> templates. I whipped up a gzipped tarball, including plugin,
> templates and a cursory README at this URI:
> http://u7.dk:8088/files/pyrss2/pyrss2.tgz
I'll take a look as soon as it's humanly possible for me to do :)
> If you want to check the output it produces by default, check:
> http://u7.dk:8088/index.rss2
That don't work, I guess the link should really be
http://u7.dk:8088/blog/index.rss2
One problem though, a quick glance at it shows:
<title>Roadmap og Milestones for u7.dk</title>
<description> ![CDATA[]] </description>
<pubDate>Tue, 21 Oct 2003 20:37 GMT</pubDate>
A few problems, ![CDATA[]] is invalid, and shows it as is. Also the date
format for pubdate is wrong I believe, it should be in the ISO8601
format., that is - 2003-10-21T03:57:37Z instead of 'Tue, 21 Oct 2003
20:37 GMT'.. You can use $w3cdate in your templates to get the dates.
> I also added an entry (two actually, one of them has a bad URI...)
> to the plugin registry. Pick the one that says 'pyrss2 plugin', not
> the one with just 'pyrss2'.
Will do.
> Please drop me a note if you use it - I'd like to hear about bugs,
> suggestions, and anything related you can think of.
I hope I pointed you to the bugs I encountered, at least if the link is
correct.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/