Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4 fetch_rss() should accept a file name or url

open
nobody
None
5
2003-01-15
2003-01-15
andrew morton
No

I've got several blogs on one server and want to use
Magpie to create a summary page. It would be much nicer
to just hand in a filesystem path rather than having
Magpie retreive the file throught the webserver.

Looking through the source this really seems tobe a
problem with snoopy though... Possibly the easiest way
to work around ti would be to force the user to format
the file as a URL, ie 'file:///home/www/index.rdf'.
Then you just have _fetch_remote_file check for URLs
starting with file://, open it through the file system
and drop the contents into $Snoopy->results ...

I might put together a patch if I get some time. I
guess it'd be better spent working on Snoopy....

Discussion

  • Logged In: YES
    user_id=22657

    A patch to do this would be great. It doesn't seem likely
    to be accepted into Snoopy as they are focused on building
    an HTTP client.

    In the meantime there is an example of parsing a local file
    with Magpie in the cookbook.

    http://magpierss.sourceforge.net/cookbook.html#from_file