Skip to content

Commit

Permalink
Fix importing of logos/photos: prefer PNG/SVG and then JPG, do not al…
Browse files Browse the repository at this point in the history
…low any other files.
  • Loading branch information
Nicky Gerritsen committed Mar 15, 2024
1 parent f8f6576 commit 661ec3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions misc-tools/import-contest.in
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ import_file('groups', ['groups.json', 'groups.tsv'])
if import_file('organizations', ['organizations.json']):
# Also import logos if we have any
# We prefer the 64x64 logo. If it doesn't exist, accept a generic logo (which might be a SVG)
import_images('organizations', 'logo', ['^logo\.64\..*$', '^logo\.[a-z]*$'])
# We also prefer PNG/SVG before JPG
import_images('organizations', 'logo', ['^logo\.64x\d+\.png$', '^logo\.(png|svg)$', '^logo\.64x\d+\.jpg$', '^logo\.jpg$'])
if import_file('teams', ['teams.json', 'teams2.tsv']):
# Also import photos of we have any
import_images('teams', 'photo', ['^photo\.[a-z]*$'])
# Also import photos if we have any, but prefer JPG over SVG and PNG
import_images('teams', 'photo', ['^photo\.jpg$', '^photo\.(png|svg)$'])
import_file('accounts', ['accounts.json', 'accounts.yaml', 'accounts.tsv'])

problems_imported = False
Expand Down

0 comments on commit 661ec3a

Please sign in to comment.