Resize firefox symbol and prevent symbol with height > 70

This commit is contained in:
Julien Duponchelle
2015-10-09 12:05:48 +02:00
parent 9047578a8b
commit edbf1382eb
4 changed files with 451 additions and 2 deletions

View File

@ -19,6 +19,7 @@ import os
import jsonschema
import json
import sys
import subprocess
def check_schema(appliance):
with open('schemas/appliance.json') as f:
@ -45,6 +46,10 @@ def check_symbol(symbol):
if not os.path.exists(licence_file):
print("Missing licence {} for {}".format(licence_file, symbol))
sys.exit(1)
height = int(subprocess.check_output(['identify', '-format', '%h', os.path.join('symbols', symbol)], shell=False))
if height > 70:
print("Symbol height of {} is too big {} > 70".format(symbol, height))
sys.exit(1)
def main():