diff options
Diffstat (limited to 'feeds')
-rw-r--r-- | feeds/feed.php | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/feeds/feed.php b/feeds/feed.php index 177071b..fd6ae49 100644 --- a/feeds/feed.php +++ b/feeds/feed.php @@ -104,7 +104,7 @@ if ($uri_parts[0] == 'packages') { print "Recent removed packages"; break; } - if ($arch != '') + if ($arch != 'all') print " (" . $arch; if ($repo != '') print " [" . $repo . "]"; @@ -112,12 +112,51 @@ if ($uri_parts[0] == 'packages') { print ")"; print "</title>"; print "<link>"; - print "https://archlinux32.org" . $_SERVER['REQUEST_URI']; + print "https://archlinux32.org/packages/"; print "</link>"; print "<description>"; + switch ($action) { + case '': + print "Recently updated packages in the Arch Linux 32 package repositories"; + break; + case 'added': + print "Recently added packages to the Arch Linux 32 package repositories"; + break; + case 'removes': + print "Recently removed packages from the Arch Linux 32 package repositories"; + break; + } + if ($arch != 'all') + print " for the " . $arch . " architecture (including 'any' packages)"; + else + print " for all architectures"; + if ($repo != '') + print " for the " . $repo . " repository"; print "</description>"; + print "<atom:link href=\"https://archlinux32.org" . $_SERVER['REQUEST_URI'] . "\" rel=\"self\">"; + print "</link>"; + print "<language>"; + print "en-us"; + print "</language>"; + print "<lastBuildDate>"; +# TODO + print "</lastBuildDate>"; + foreach ($packages as $package) { + print "<item>"; + print "<title>"; + print $package['pkgname']; + if (array_key_exists('epoch',$package)) + print $package['epoch'] . ":"; + print $package['pkgver'] . "-" . $package['pkgrel']; + if (!$package['sub_pkgrel_omitted']) + print '.' . $package['sub_pkgrel']; + pinrt ' ' . $package['architecture']; + print "</title>"; # TODO + print "</item>"; + } print "</channel>"; + print "</rss>"; die(); |