mirror of
https://github.com/zen-browser/theme-store.git
synced 2025-07-07 17:05:31 +02:00
feat: Add version to theme.json files
This commit is contained in:
parent
a23e634a6e
commit
bb113e7c8a
19 changed files with 197 additions and 33 deletions
18
scripts/__add-missing-versions.py
Normal file
18
scripts/__add-missing-versions.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import os
|
||||
import json
|
||||
|
||||
if __name__ == "__main__":
|
||||
for themeId in os.listdir("themes"):
|
||||
themeFolder = os.path.join("themes", themeId)
|
||||
if not os.path.isdir(themeFolder):
|
||||
continue
|
||||
themeDataFile = os.path.join(themeFolder, "theme.json")
|
||||
if not os.path.exists(themeDataFile):
|
||||
continue
|
||||
with open(themeDataFile, "r") as f:
|
||||
themeData = json.load(f)
|
||||
if "version" not in themeData:
|
||||
themeData["version"] = "1.0.0"
|
||||
with open(themeDataFile, "w") as f:
|
||||
json.dump(themeData, f, indent=4)
|
||||
print(f"Added version to theme: {themeId}")
|
Loading…
Add table
Add a link
Reference in a new issue