From 570e63a2f80ccff168d0ab9fd23dc7ed7aa411e3 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 9 Feb 2008 09:35:06 +0000 Subject: contrib/angstrom/rss*.php: Drop old non-optimal version, rename rss2 to rss. * Per RFC on the list. --- contrib/angstrom/rss.php | 87 +++++++++++++++++++++++++++-------------------- contrib/angstrom/rss2.php | 63 ---------------------------------- 2 files changed, 51 insertions(+), 99 deletions(-) delete mode 100644 contrib/angstrom/rss2.php diff --git a/contrib/angstrom/rss.php b/contrib/angstrom/rss.php index cf5a9e0218..2e1f49c4cc 100644 --- a/contrib/angstrom/rss.php +++ b/contrib/angstrom/rss.php @@ -1,48 +1,63 @@ -'); ?> - - - Ångström autobuilder updates - http://www.angstrom-distribution.org/unstable/autobuild/ - - en openMemory(); - echo "\n" - echo "$file/$file2 uploaded\n"; - echo " http://www.angstrom-distribution.org/unstable/autobuild/$file/$file2\n"; +$rss_xml->startDocument('1.0','utf-8'); +$rss_xml->startElement('rss'); +$rss_xml->writeAttribute('version', '2.0'); - $rsstime = strftime("%a, %d %b %Y %T +0100", $fmtime); +$rss_xml->startElement('channel'); - echo "$rsstime\n"; - echo "Angstrom autobuilder"; - echo "\n"; - } - } +$rss_xml->writeElement('title', 'Ångström autobuilder updates'); +$rss_xml->writeElement('link', $build_link_base); +$rss_xml->writeElement('description', 'Ångström autobuilder updates list'); - closedir($second_handle); - } +foreach($builder_log_date as $build) +{ + $build = str_replace("\n", "", $build); + $data = explode(' ', $build); + + $rss_xml->startElement('item'); + $rss_xml->writeElement('title', "{$data[1]} ({$data[2]}) built for {$data[3]} (" . date('c', $data[0]) . ")"); + $rss_xml->writeElement('link', "{$build_link_base}{$data[3]}/"); + $rss_xml->writeElement('pubDate', date('r', $data[0])); - closedir($handle); + $rss_xml->endElement(); } + +$rss_xml->endElement(); +$rss_xml->endElement(); + +echo $rss_xml->outputMemory(true); + +echo "\n"; ?> - - diff --git a/contrib/angstrom/rss2.php b/contrib/angstrom/rss2.php deleted file mode 100644 index 2e1f49c4cc..0000000000 --- a/contrib/angstrom/rss2.php +++ /dev/null @@ -1,63 +0,0 @@ -openMemory(); - -$rss_xml->startDocument('1.0','utf-8'); -$rss_xml->startElement('rss'); -$rss_xml->writeAttribute('version', '2.0'); - -$rss_xml->startElement('channel'); - -$rss_xml->writeElement('title', 'Ångström autobuilder updates'); -$rss_xml->writeElement('link', $build_link_base); -$rss_xml->writeElement('description', 'Ångström autobuilder updates list'); - -foreach($builder_log_date as $build) -{ - $build = str_replace("\n", "", $build); - $data = explode(' ', $build); - - $rss_xml->startElement('item'); - $rss_xml->writeElement('title', "{$data[1]} ({$data[2]}) built for {$data[3]} (" . date('c', $data[0]) . ")"); - $rss_xml->writeElement('link', "{$build_link_base}{$data[3]}/"); - $rss_xml->writeElement('pubDate', date('r', $data[0])); - - $rss_xml->endElement(); -} - -$rss_xml->endElement(); -$rss_xml->endElement(); - -echo $rss_xml->outputMemory(true); - -echo "\n"; -?> -- cgit v1.2.3