From 9633cb1d2b00cdfb8905b74a9dc1736b3543efd1 Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Fri, 11 Mar 2022 20:45:49 -0800 Subject: [PATCH] have the bot convert tiff to jpg as well --- .gitignore | 0 app/bot.py | 12 ++++++------ app/questions.py | 0 helm/values.yaml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) mode change 100755 => 100644 .gitignore mode change 100755 => 100644 app/questions.py diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/app/bot.py b/app/bot.py index 654d7a0a..1c207dd9 100755 --- a/app/bot.py +++ b/app/bot.py @@ -81,13 +81,13 @@ async def convert_heic_to_jpg(ctx): if ctx.attachments: for attachment in ctx.attachments: - if attachment.filename.lower().endswith("heic"): - heic_file = "/tmp/heic" - jpg_file = "/tmp/jpg.jpg" - await attachment.save(fp=heic_file) + if attachment.filename.lower().endswith(("heic", "tiff")): + source_file = "/tmp/source" + jpg_file = "/tmp/converted.jpg" + await attachment.save(fp=source_file) - # Convert heic to jpg - img = Image(filename=heic_file) + # Convert to jpg + img = Image(filename=source_file) img.format = "jpg" img.save(filename=jpg_file) img.close() diff --git a/app/questions.py b/app/questions.py old mode 100755 new mode 100644 diff --git a/helm/values.yaml b/helm/values.yaml index 433b63ab..e9877e4e 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -8,7 +8,7 @@ image: repository: ldooks/dragon-bot pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "128" + tag: "130" imagePullSecrets: [] nameOverride: ""