importing RSS files (SiteSummary product)
Hi everyone, I'm afraid I've bumped into the limit of my Zope and Python knowledge here. Edd says in the README for his cool SiteSummary product: "If you want your Site Summary to import data on a regular basis, you can write a program which fetches the URL: http://www.mysite.com/mySummary/importFromURL?url=http://xmlhack.com/rss.php and adjust the url parameter for the RSS file you wish to acquire." Now let's say that I'd like to display the news from Zope.org on my site. The RSS file is at http://www.zope.org/SiteIndex/news.rss It's obviously poor manners to get the RSS file directly from the site every time the page is requested. What would be the best strategy to display the news on my Linux-based server? I'm really not sure how to proceed here. Any help would be greatly appreciated. -Tim -- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@visi.com | -Einstein | http://www.mn-linux.org/
On 21-Nov-1999 Timothy Wilson wrote:
Now let's say that I'd like to display the news from Zope.org on my site. The RSS file is at http://www.zope.org/SiteIndex/news.rss
It's obviously poor manners to get the RSS file directly from the site every time the page is requested. What would be the best strategy to display the news on my Linux-based server? I'm really not sure how to proceed here. Any help would be greatly appreciated.
Tim, I do this rather easily with a cron job that runs every hour. For instance, I have a SiteSummary object on my server called freshmeatXML. Then I created a shell script called /usr/local/bin/updateXML with these contents: #!/bin/sh lynx -source http://localhost/freshmeatXML/importFromURL?url=http://freshmeat.net/ backend/fm.rdf So then I just linked the script in /etc/cron.daily (if you are lucky enough to have a RedHat or Mandrake box, putting scripts in this directory will automatically 'cronify' them) If you don't have RH or similar, you can put them in cron directly by running 'crontab -e' and inserting the following line: 00 * * * * /usr/local/bin/updateXML This will run the script at every minute zero. Which of course, occurs once an hour. Hope this helps.. Adam -- M. Adam Kendall | mak@kha0s.org | "There's never enough time to do http://kha0s.org | all the nothing you want." | --Bill Watterson (Calvin and Hobbes)
This may help a bit: http://www.zope.org/Members/itamar/ZCache (I haven't used it myself, though) ~Shalabh ----- Original Message ----- From: Timothy Wilson <wilson@visi.com> To: Zope listserv <zope@zope.org> Sent: Sunday, November 21, 1999 9:53 PM Subject: [Zope] importing RSS files (SiteSummary product) | Hi everyone, | | I'm afraid I've bumped into the limit of my Zope and Python knowledge | here. Edd says in the README for his cool SiteSummary product: | | "If you want your Site Summary to import data on a regular basis, you can | write a program which fetches the URL: | | http://www.mysite.com/mySummary/importFromURL?url=http://xmlhack.com/rss .php | | and adjust the url parameter for the RSS file you wish to acquire." | | Now let's say that I'd like to display the news from Zope.org on my site. | The RSS file is at http://www.zope.org/SiteIndex/news.rss | | It's obviously poor manners to get the RSS file directly from the site | every time the page is requested. What would be the best strategy to | display the news on my Linux-based server? I'm really not sure how to | proceed here. Any help would be greatly appreciated. | | -Tim | | -- | Timothy Wilson | "The faster you | Check out: | Henry Sibley H.S. | go, the shorter | http://slashdot.org/ | W. St. Paul, MN, USA | you are." | http://linux.com/ | wilson@visi.com | -Einstein | http://www.mn-linux.org/ | | | _______________________________________________ | Zope maillist - Zope@zope.org | http://lists.zope.org/mailman/listinfo/zope | No cross posts or HTML encoding! | (Related lists - | http://lists.zope.org/mailman/listinfo/zope-announce | http://lists.zope.org/mailman/listinfo/zope-dev ) |
participants (3)
-
M. Adam Kendall -
Shalabh Chaturvedi -
Timothy Wilson