diff options
author | Koen Kooi <koen@openembedded.org> | 2007-12-06 14:48:06 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2007-12-06 14:48:06 +0000 |
commit | c712e2c908a03640dae2e4e5fb84ae3e49394b58 (patch) | |
tree | 526aad250544fd220326b7cce42c64975cad1ba6 /contrib/angstrom/rss.php | |
parent | c99886f6d3558e40c72f447d8ae36303f7ee1d4a (diff) |
contrib: angstrom/rss.php: quick & dirty rss generator for autobuilder uploads
* point your newsreader to http://www.angstrom-distribution.org/unstable/autobuild/rss.php to view it in actions
Diffstat (limited to 'contrib/angstrom/rss.php')
-rw-r--r-- | contrib/angstrom/rss.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/contrib/angstrom/rss.php b/contrib/angstrom/rss.php new file mode 100644 index 0000000000..85b0a51fb4 --- /dev/null +++ b/contrib/angstrom/rss.php @@ -0,0 +1,43 @@ +<? print('<?xml version="1.0" encoding="utf-8"?>');?> +<rss version="2.0" xml:base="http://www.anstrom-distribution.org/unstable/autobuild/" xmlns:dc="http://purl.org/dc/elements/1.1/"> +<channel> + <title>Ã…ngstrom autobuilder updates </title> + <link>http://www.anstrom-distribution.org/unstable/autobuild</link> + <description></description> + <language>en</language> +<?php + +$base_path = "/home/angstrom/website/unstable/autobuild"; + +if ($handle = opendir("$base_path")) { + + while (false !== ($file = readdir($handle))) { + if(is_dir($file) && $file != "." && $file != "..") { + $second_handle = opendir("$base_path/$file/"); + while (false !== ($file2 = readdir($second_handle))) { + if(is_file("/$base_path/$file/$file2")) { + $fmtime = filemtime("$file/$file2"); + +print("<item>\n"); +print("<title>$file/$file2 uploaded</title>\n"); +print(" <link>http://www.anstrom-distribution.org/unstable/autobuild/$file/$file2</link>\n"); + +$rsstime = strftime("%a, %d %b %Y %T +0000", $fmtime); + +print("<pubDate>$rsstime</pubDate>\n"); +print("<dc:creator>Angstrom autobuilder</dc:creator>"); +print("</item>\n"); + + } + } + closedir($second_handle); + } + + } + closedir($handle); +} +?> +</channel> +</rss> + + |