BAPSicle/build/generate-platypus-config.py
2021-04-19 15:45:20 +01:00

16 lines
586 B
Python
Executable file

#!/usr/bin/env python3
from plistlib import load, dump
import package
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
with open(dir_path + "/BAPSicle.template.platypus", 'rb') as temp:
pl = load(temp)
pl["Version"] = "{}~{}".format(package.VERSION, package.BUILD)
pl["Name"] = package.NICE_NAME
pl["StatusItemTitle"] = package.NICE_NAME
pl["Author"] = package.AUTHOR
pl["Identifier"] = "org.{}.{}".format(package.AUTHOR.lower().replace(" ", ""), package.NAME)
with open(dir_path + "/BAPSicle.platypus", 'wb') as out:
dump(pl, out)