[oe-commits] org.oe.dev contrib: angstrom/rss.php: quick & dirty rss generator for autobuilder uploads

koen commit openembedded-commits at lists.openembedded.org
Thu Dec 6 15:13:22 UTC 2007


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

Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: fc88fbaef7ff2d56f99eabeb4e51fd5f5860dc6a
ViewMTN: http://monotone.openembedded.org/revision/info/fc88fbaef7ff2d56f99eabeb4e51fd5f5860dc6a
Files:
1
contrib/angstrom/rss.php
Diffs:

#
# mt diff -rbb6c4a865ce1530f60907a25c88a3be023054e5b -rfc88fbaef7ff2d56f99eabeb4e51fd5f5860dc6a
#
# 
# 
# add_file "contrib/angstrom/rss.php"
#  content [6f8baf615bfef09d487fcf84e4464f13e89e20ec]
# 
============================================================
--- contrib/angstrom/rss.php	6f8baf615bfef09d487fcf84e4464f13e89e20ec
+++ contrib/angstrom/rss.php	6f8baf615bfef09d487fcf84e4464f13e89e20ec
@@ -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>
+
+






More information about the Openembedded-commits mailing list