Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

RSS extension (an other one)

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


sylvain at chicoree

Nov 14, 2009, 8:30 AM

Post #1 of 2 (568 views)
Permalink
RSS extension (an other one)

Hi,

I am using MediaWiki both for the "collective documentation" of in-house
projects, and as a CMS for the publication of my personal site.


Recently, I needed to publish as a RSS feed both a list of "important" articles
(manually maintained) and the table of content of some (if not all) articles.

There are quite few extensions listed in
http://www.mediawiki.org/wiki/Category:Feed_generator_extensions. But none of
them really does the trick. Mostly because the feed generator was required to be
*non intrusive*. I.e., usage of any special tag in the wikitext was prohibited.

In addition, it would have been preferable to work at *article* (by opposite to
querying the database).

For all there reasons (and well ... also for fun, I must admit;) ) I started to
work on a custom feed generator. In fact, it is mostly a wrapper around an XSLT
stylesheet that build a RSS feed from the /first/ list found in an article
parsed as HTML.

This has the advantage of working both for "in text" lists and for TOCs, since
those are generated as a list before the first heading. So they are likely to be
the first list of an article.

Moreover, since we are using the convention of beginning each article by a short
description (more or less like a Wikipedia article), that text was relatively
easy to extract as the description of the feed.

Of course, this is not 100% bulletproof, but it works most of the time. And
require only to add "?action=tofeed" at the end of the URL to retrieve the feed
of that article (could easily be hidden thought url rewriting).


Now, I think it would be great to share that code with the community. So here I
join the source of this extension and the stylesheet. And I would be glad if
anyone could take time to review that code. And telling me if I'm doing the
things "the right way". Any hint or advice would also been greatly appreciated ;)


Best regards,
Sylvain.

PS/You could try it "live" on my site:
http://www.chicoree.fr/w/Derniers_articles?action=tofeed
http://www.chicoree.fr/w/Installer_JBoss_AS_5?action=tofeed
Those articles are in French. But at least it should let you have the feeling
how it works.


--
sylvain [at] chicoree
http://www.chicoree.fr


sylvain at chicoree

Nov 14, 2009, 9:10 AM

Post #2 of 2 (527 views)
Permalink
Re: RSS extension (an other one) [In reply to]

As I notice the list doesn't accept attachments, here is a link to download my
feed generator: http://www.chicoree.fr/pub/mediawiki/ToFeed.tar.gz

Thanks in advance for your time,
Sylvain.

--
sylvain [at] chicoree
http://www.chicoree.fr



_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.