Chore: script to move images from imgur to panoramax

This commit is contained in:
Pieter Vander Vennet 2024-11-14 02:08:10 +01:00
parent 6e335c91d4
commit dcfa829e1a
3 changed files with 12 additions and 10 deletions

View file

@ -88,7 +88,7 @@ export default class GenerateImageAnalysis extends Script {
if (image === undefined) {
return false
}
if (!image.match(/https:\/\/i\.imgur\.com\/[a-zA-Z0-9]+\.jpg/)) {
if (!image.match(/https:\/\/i\.imgur\.com\/[a-zA-Z0-9]+(\.jpe?g)|(\.png)/)) {
return false
}
const filename = image.replace(/[\/:.\-%]/g, "_") + ".json"