From: Frank Lichtenheld Date: Tue, 28 Nov 2006 02:44:49 +0000 (+0000) Subject: Add a proof-of-concept rfc822 output for search results X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=710232cb54ed753ebc36cb1cde5a214aa8494b34;p=deb%2Fpackages.git Add a proof-of-concept rfc822 output for search results --- diff --git a/templates/rfc822/foot.tmpl b/templates/rfc822/foot.tmpl new file mode 100644 index 0000000..e69de29 diff --git a/templates/rfc822/search.tmpl b/templates/rfc822/search.tmpl new file mode 100644 index 0000000..955bf45 --- /dev/null +++ b/templates/rfc822/search.tmpl @@ -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 -%]