RSS feed manipulation is alive
Daniel Sheppard
daniels at pronto.com.au
Thu Sep 29 03:20:15 EDT 2005
Bah, bugs abound.
This fixes the mime-types and also no longer barfs when it tries to
parse a page and it can't.
Mousehole laughs in the face of partial-content feeds.
-----Original Message-----
From: mousehole-scripters-bounces at rubyforge.org
[mailto:mousehole-scripters-bounces at rubyforge.org] On Behalf Of Daniel
Sheppard
Sent: Thursday, 29 September 2005 5:05 PM
To: mousehole-scripters at rubyforge.org
Subject: RE: RSS feed manipulation is alive
Bah, it seems every time I make a post anywhere this week, it's followed
by a correction.
It's currently only picking up the application/xml and text/xml mime
types - if you want application/atom+xml, you'll have to edit line 29.
-----Original Message-----
From: mousehole-scripters-bounces at rubyforge.org
[mailto:mousehole-scripters-bounces at rubyforge.org] On Behalf Of Daniel
Sheppard
Sent: Thursday, 29 September 2005 4:56 PM
To: mousehole-scripters at rubyforge.org
Subject: RSS feed manipulation is alive
<<fix_xml.rb>> Requires some fiddling. You need to require the fix_xml
in your mousehole launcher, this provides:
- the ability to manipulate RSS/ATOM feeds
- only for application/xml+atom and text/xml mime types
- all output will be as an ATOM 1.0 feed
- the ability to cancel the manipulation of a page by raising
MouseHole::CancelRewrite
- this allows you to decide whether or not your script should
execute from within the script.
- helps to avoid both the overhead and error potential of page
reconstruction.
Then you can use the attached "Atomic Mouse" user script, wherein you
enter in an RSS/ATOM path and an Xpath for extracting from the
full-content page to create a full-content ATOM feed. The script will
cache page content so that you don't incur the wrath of an angry
webmaster. The cache is cleared upon modification of the xpath rule -
I'll probably change it to also keep an eye on the last updated time on
the feed entry as well.
########################################################################
#############
This email has been scanned by MailMarshal, an email content filter.
########################################################################
#############
########################################################################
#############
This email has been scanned by MailMarshal, an email content filter.
########################################################################
#############
_______________________________________________
Mousehole-scripters mailing list
Mousehole-scripters at rubyforge.org
http://rubyforge.org/mailman/listinfo/mousehole-scripters
#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_xml.rb
Type: application/octet-stream
Size: 5320 bytes
Desc: fix_xml.rb
Url : http://rubyforge.org/pipermail/mousehole-scripters/attachments/20050929/c27b2a39/fix_xml.obj
More information about the Mousehole-scripters
mailing list