website diff lib/get-feeds.sh @ rev 930

RSS Feed is now relayed on Twitter and Facebook (all contributor can use it)
author Christophe Lincoln <pankso@slitaz.org>
date Mon Mar 12 20:30:07 2012 +0100 (2012-03-12)
parents 7cef1e1e57fb
children e2a0a816a8c6
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lib/get-feeds.sh	Mon Mar 12 20:30:07 2012 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +#!/bin/sh
     1.5 +# 
     1.6 +# Get latest commits and feeds to display on the website main page.
     1.7 +# On Tank, this script is executed by cron each hour.
     1.8 +#
     1.9 +
    1.10 +CACHE="/var/cache/slitaz/website"
    1.11 +
    1.12 +# Feeds URL http://scn.slitaz.org/activity/feed/
    1.13 +SCN_FEED='http://scn.slitaz.org/activity/feed/'
    1.14 +BLOG_FEED='http://scn.slitaz.org/category/news/feed/'
    1.15 +WOK_FEED='http://hg.slitaz.org/wok/rss-log'
    1.16 +FORUM_FEED='http://forum.slitaz.org/rss'
    1.17 +
    1.18 +# Clean cache
    1.19 +mkdir -p $CACHE && cd $CACHE
    1.20 +rm -f *.xml
    1.21 +
    1.22 +# Cache all feeds to save bandwidth (updated by cron)
    1.23 +echo -n "Getting latest rss feeds... "
    1.24 +wget -O scn.xml $SCN_FEED 2>/dev/null
    1.25 +wget -O wok.xml $WOK_FEED 2>/dev/null
    1.26 +wget -O blog.xml $BLOG_FEED 2>/dev/null
    1.27 +#wget -O forum.xml $FORUM_FEED 2>/dev/null
    1.28 +echo "Done"
    1.29 +
    1.30 +exit 0