cookutils diff web/cooker.cgi @ rev 331
cookiso.cgi: pack rsync log output
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 16 16:44:10 2012 +0100 (2012-03-16) |
parents | 47462be366b7 |
children | 512cece24f7c |
line diff
1.1 --- a/web/cooker.cgi Thu Mar 01 12:44:39 2012 +0100 1.2 +++ b/web/cooker.cgi Fri Mar 16 16:44:10 2012 +0100 1.3 @@ -29,6 +29,30 @@ 1.4 # Functions 1.5 # 1.6 1.7 +# RSS feed generator 1.8 +if [ "$QUERY_STRING" == "rss" ]; then 1.9 + pubdate=$(date "+%a, %d %b %Y %X") 1.10 + cat << EOT 1.11 +<?xml version="1.0" encoding="utf-8" ?> 1.12 +<rss version="2.0"> 1.13 +<channel> 1.14 + <title>SliTaz Cooker</title> 1.15 + <description>The SliTaz packages cooker feed</description> 1.16 + <link>$COOKER_URL</link> 1.17 + <lastBuildDate>$pubdate GMT</lastBuildDate> 1.18 + <pubDate>$pubdate GMT</pubDate> 1.19 +EOT 1.20 + for rss in $(ls -lt $FEEDS/*.xml | head -n 12) 1.21 + do 1.22 + cat $rss 1.23 + done 1.24 + cat << EOT 1.25 +</channel> 1.26 +</rss> 1.27 +EOT 1.28 + exit 0 1.29 +fi 1.30 + 1.31 # Put some colors in log and DB files. 1.32 syntax_highlighter() { 1.33 case $1 in