From 8da20e712814c6f1092f428816299fb4f4cc34d1 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 14 Jan 2021 12:10:49 +0700 Subject: Initial version. --- scripts/list-snapshots.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/list-snapshots.py b/scripts/list-snapshots.py index b98ab37..0d1cedd 100755 --- a/scripts/list-snapshots.py +++ b/scripts/list-snapshots.py @@ -11,6 +11,8 @@ import json import boto3 +import jinja2 + bucket = os.getenv("SNAPSHOTS_BUCKET") def make_link(s, f): @@ -42,4 +44,17 @@ for name in snapshot_names: snapshots.append(snapshot) -print(json.dumps(snapshots, indent=4)) +#print(json.dumps(snapshots, indent=4)) + +tmpl = jinja2.Template(""" +{% for s in snapshots %} +

{{s.name}}

+ +{% endfor %} +""") + +print(tmpl.render(snapshots=snapshots)) -- cgit v1.2.3