def BuildPF():
CustomPrefList = buildlistdir("./Preferences")
Plist = plistlib.readPlist('./BasePreferences.plist')
#Sort Modules
for key in ModuleDict.keys():
ModuleDict[key].sort()
#Start
SortedKeys=ModuleDict.keys()
for key in SortedKeys:
if len(ModuleDict[key])<=0:
continue
Dict = {
"cell": "PSGroupCell",
"label": key
}
Plist["items"].append(Dict)
for x in ModuleDict[key]:
CustomPrefPath = x + ".plist"
if (CustomPrefPath in CustomPrefList):
custom = plistlib.readPlist('./Preferences/' + CustomPrefPath)
Plist["items"].append(custom)
Dict = {
"cell": "PSSwitchCell",
"label": x,
"key": x,
"default": False,
"defaults": "naville.wtfjh"
}
Plist["items"].append(Dict)
Dict = {
"cell": "PSGroupCell",
"footerText": "https://github.com/Naville/WTFJH"
}
Plist["items"].append(Dict)
plistlib.writePlist(Plist, "./layout/Library/PreferenceLoader/Preferences/WTFJHPreferences.plist")
评论列表
文章目录