From 3ea5bd07c23838b1a96357089e8173a094dfaed1 Mon Sep 17 00:00:00 2001 From: Scott Bahling Date: Thu, 3 Mar 2016 02:19:13 +0100 Subject: Add formatter class and extend FileInfo class --- obsapi/templates/FileInfo.j2 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 obsapi/templates/FileInfo.j2 (limited to 'obsapi/templates/FileInfo.j2') diff --git a/obsapi/templates/FileInfo.j2 b/obsapi/templates/FileInfo.j2 new file mode 100644 index 0000000..af77bcc --- /dev/null +++ b/obsapi/templates/FileInfo.j2 @@ -0,0 +1,27 @@ +{{this.filename}} +{{'-' * this.filename|length}} +{%- if this.is_pkg %} +Name : {{this.name}} +Version : {{this.version}} +Release : {{this.release}} +Architecture: {{this.arch}} +Size : {{this.size}} +{%- if this.source %} +Source RPM : {{this.source}} +{%- endif %} +Build Date : {{this.datetime.strftime('%Y-%m-%dT%H:%M')}} +Summary : {{this.summary}} +Description : +{{this.description}} +Provides : +{%- for provides in this.provides %} + {{provides}} +{%- endfor %} +Requires : +{%- for requires in this.requires %} + {{requires}} +{%- endfor %} +{%- else %} +Size : {{this.size}} +Modified : {{this.mtime}} +{%- endif %} -- cgit v1.2.3