website view lib/get-feeds.sh @ rev 1344

Resize balinor logo to 120px
author Christophe Lincoln <pankso@slitaz.org>
date Fri Jan 22 23:02:15 2021 +0100 (17 months ago)
parents e2dd3dc9eab9
children
line source
1 #!/bin/sh
2 #
3 # Get latest commits and feeds to display on the website main pages.
4 # On the server, this script is executed by cron each hour.
5 #
6 PWD=$(dirname $0)
7 CACHE="$(dirname $PWD)/cache"
9 # Feeds URL http://scn.slitaz.org/activity/feed/
10 BLOG_FEED='http://scn.slitaz.org/?blog=rss'
11 WOK_FEED='http://hg.slitaz.org/wok/rss-log'
12 FORUM_FEED='http://forum.slitaz.org/rss'
13 ROLLING_DATE='http://mirror1.slitaz.org/rolling-date.sh'
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 wok.xml $WOK_FEED 2>/dev/null
22 wget -O blog.xml $BLOG_FEED 2>/dev/null
23 wget -O forum.xml $FORUM_FEED 2>/dev/null
24 wget -O rolling-date.txt $ROLLING_DATE 2>/dev/null
25 echo "Done"
27 exit 0