website view lib/get-feeds.sh @ rev 985
webchat: utf-8 and russian link
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Mar 20 19:58:37 2012 +0200 (2012-03-20) |
parents | 6bdb0d107255 |
children | e2dd3dc9eab9 |
line source
1 #!/bin/sh
2 #
3 # Get latest commits and feeds to display on the website main page.
4 # On Tank, this script is executed by cron each hour.
5 #
7 CACHE="/var/cache/slitaz/website"
9 # Feeds URL http://scn.slitaz.org/activity/feed/
10 SCN_FEED='http://scn.slitaz.org/activity/feed/'
11 BLOG_FEED='http://scn.slitaz.org/category/news/feed/'
12 WOK_FEED='http://hg.slitaz.org/wok/rss-log'
13 FORUM_FEED='http://forum.slitaz.org/rss'
15 # Clean cache
16 mkdir -p $CACHE && cd $CACHE
17 rm -f *.xml
19 # Cache all feeds to save bandwidth (updated by cron)
20 echo -n "Getting latest rss feeds... "
21 wget -O scn.xml $SCN_FEED 2>/dev/null
22 wget -O wok.xml $WOK_FEED 2>/dev/null
23 wget -O blog.xml $BLOG_FEED 2>/dev/null
24 wget -O forum.xml $FORUM_FEED 2>/dev/null
25 echo "Done"
27 exit 0