]> git.deb.at Git - deb/packages.git/commitdiff
Add a proof-of-concept rfc822 output for search results
authorFrank Lichtenheld <frank@lichtenheld.de>
Tue, 28 Nov 2006 02:44:49 +0000 (02:44 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Tue, 28 Nov 2006 02:44:49 +0000 (02:44 +0000)
templates/rfc822/foot.tmpl [new file with mode: 0644]
templates/rfc822/search.tmpl [new file with mode: 0644]

diff --git a/templates/rfc822/foot.tmpl b/templates/rfc822/foot.tmpl
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/templates/rfc822/search.tmpl b/templates/rfc822/search.tmpl
new file mode 100644 (file)
index 0000000..955bf45
--- /dev/null
@@ -0,0 +1,31 @@
+[%- FOREACH categories -%]
+ [%- FOREACH packages -%]
+  [%- FOREACH s IN suites -%]
+    [%- FOREACH s.versions %]
+Package: [% pkg %]
+Url: [% packages_homepage _ make_url(pkg,'','suite',s.suite,'arch','','section','','format','') %]
+Archive: [% archive %]
+Suite: [% s.suite %]
+Section: [% s.section %]
+[%- "\nSubsection: $s.subsect" IF s.subsect %]
+Description: [% s.desc %]
+Version: [% version %]
+Architectures: [% architectures.join(' ') %]
+[%- IF s.providers %]
+Provided-by: [% s.providers.join(', ') %]
+[%- END -%]
+
+[% END; END; END; END -%]
+
+[%- FOREACH categories -%]
+ [%- FOREACH src_packages -%]
+  [%- FOREACH origins -%]
+     [%- origin = (archive == main_archive) ? suite : "$suite/$archive" %]
+Package: [% pkg %]
+Url: [% packages_homepage _ make_url(pkg,'','source','source','suite',origin,'section','','arch','','format','') %]
+[%- "\nArchive: $real_archive" IF real_archive %]
+[%- "\nSection: $section" IF section %]
+Subsection: [% subsection %]
+Version: [% version %]
+Binaries: [% binaries.join(', ') %]
+[% END; END; END -%]