1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-11-20 01:52:32 +01:00
This commit is contained in:
GilbN 2021-08-15 23:46:04 +00:00
parent 85e65b6e71
commit 78b0c09bcd
18 changed files with 498 additions and 4 deletions

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 167 KiB

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -43,7 +43,7 @@ if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/bazarr\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/bazarr\/${TP_ADDON}\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${TP_ADDON}"
fi
fi

View File

@ -47,7 +47,7 @@ if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/radarr\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/radarr\/${TP_ADDON}\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${TP_ADDON}"
fi
fi

View File

@ -46,7 +46,7 @@ if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/readarr\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/readarr\/${TP_ADDON}\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${TP_ADDON}"
fi
fi

View File

@ -47,7 +47,7 @@ if ! grep -q "${TP_DOMAIN}" "${APP_FILEPATH}"; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/variables\/${TP_THEME}.css'><\/head> /g" "${LOGIN_FILEPATH}"
printf 'Stylesheet set to %s\n' "${TP_THEME}"
if [[ -n ${TP_ADDON} ]]; then
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/sonarr\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
sed -i "s/<\/head>/<link rel='stylesheet' href='https:\/\/${TP_DOMAIN}\/CSS\/addons\/sonarr\/${TP_ADDON}\/${TP_ADDON}.css'><\/head> /g" "${APP_FILEPATH}"
printf 'Added custom addon: %s\n\n' "${TP_ADDON}"
fi
fi

409
themes.json Normal file
View File

@ -0,0 +1,409 @@
{
"applications": {
"petio": {
"base_css": "https://theme-park.dev/CSS/themes/petio/petio-base.css?sha=4dd9253",
"addons": {}
},
"rutorrent": {
"base_css": "https://theme-park.dev/CSS/themes/rutorrent/rutorrent-base.css?sha=4dd9253",
"addons": {}
},
"duplicacy": {
"base_css": "https://theme-park.dev/CSS/themes/duplicacy/duplicacy-base.css?sha=4dd9253",
"addons": {}
},
"gaps": {
"base_css": "https://theme-park.dev/CSS/themes/gaps/gaps-base.css?sha=4dd9253",
"addons": {}
},
"pihole": {
"base_css": "https://theme-park.dev/CSS/themes/pihole/pihole-base.css?sha=4dd9253",
"addons": {}
},
"kitana": {
"base_css": "https://theme-park.dev/CSS/themes/kitana/kitana-base.css?sha=4dd9253",
"addons": {}
},
"bitwarden": {
"base_css": "https://theme-park.dev/CSS/themes/bitwarden/bitwarden-base.css?sha=4dd9253",
"addons": {}
},
"prowlarr": {
"base_css": "https://theme-park.dev/CSS/themes/prowlarr/prowlarr-base.css?sha=4dd9253",
"addons": {}
},
"logarr": {
"base_css": "https://theme-park.dev/CSS/themes/logarr/logarr-base.css?sha=4dd9253",
"addons": {}
},
"adguard": {
"base_css": "https://theme-park.dev/CSS/themes/adguard/adguard-base.css?sha=4dd9253",
"addons": {}
},
"resilio-sync": {
"base_css": "https://theme-park.dev/CSS/themes/resilio-sync/resilio-sync-base.css?sha=4dd9253",
"addons": {}
},
"librespeed": {
"base_css": "https://theme-park.dev/CSS/themes/librespeed/librespeed-base.css?sha=4dd9253",
"addons": {}
},
"deluge": {
"base_css": "https://theme-park.dev/CSS/themes/deluge/deluge-base.css?sha=4dd9253",
"addons": {}
},
"unraid": {
"base_css": "https://theme-park.dev/CSS/themes/unraid/unraid-base.css?sha=4dd9253",
"addons": {
"login-page": {
"alien": {
"css": [
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/green.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/white.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/red.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/blue.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/custom.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/amber.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/retro-terminal-base.css?sha=4dd9253"
]
},
"fallout": {
"css": [
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/green.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/white.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/red.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/blue.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/custom.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/amber.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/retro-terminal-base.css?sha=4dd9253"
]
},
"retro-terminal": {
"css": [
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/green.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/white.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/red.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/blue.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/custom.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/amber.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/retro-terminal-base.css?sha=4dd9253"
]
}
}
}
},
"gitea": {
"base_css": "https://theme-park.dev/CSS/themes/gitea/gitea-base.css?sha=4dd9253",
"addons": {}
},
"emby": {
"base_css": "https://theme-park.dev/CSS/themes/emby/emby-base.css?sha=4dd9253",
"addons": {}
},
"transmission": {
"base_css": "https://theme-park.dev/CSS/themes/transmission/transmission-base.css?sha=4dd9253",
"addons": {}
},
"plpp": {
"base_css": "https://theme-park.dev/CSS/themes/plpp/plpp-base.css?sha=4dd9253",
"addons": {}
},
"organizr": {
"base_css": "https://theme-park.dev/CSS/themes/organizr/organizr-base.css?sha=4dd9253",
"addons": {
"glass": {
"css": [
"https://theme-park.dev/CSS/addons/organizr/glass/glass-login.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/organizr/glass/glass-base.css?sha=4dd9253"
]
}
}
},
"nzbget": {
"base_css": "https://theme-park.dev/CSS/themes/nzbget/nzbget-base.css?sha=4dd9253",
"addons": {}
},
"bazarr": {
"base_css": "https://theme-park.dev/CSS/themes/bazarr/bazarr-base.css?sha=4dd9253",
"addons": {
"bazarr-4k-logo": {
"css": [
"https://theme-park.dev/CSS/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css?sha=4dd9253"
]
}
}
},
"moviematch": {
"base_css": "https://theme-park.dev/CSS/themes/moviematch/moviematch-base.css?sha=4dd9253",
"addons": {}
},
"vuetorrent": {
"base_css": "https://theme-park.dev/CSS/themes/vuetorrent/vuetorrent-base.css?sha=4dd9253",
"addons": {}
},
"sabnzbd": {
"base_css": "https://theme-park.dev/CSS/themes/sabnzbd/sabnzbd-base.css?sha=4dd9253",
"addons": {}
},
"synclounge": {
"base_css": "https://theme-park.dev/CSS/themes/synclounge/synclounge-base.css?sha=4dd9253",
"addons": {}
},
"netdata": {
"base_css": "https://theme-park.dev/CSS/themes/netdata/netdata-base.css?sha=4dd9253",
"addons": {}
},
"grafana": {
"base_css": "https://theme-park.dev/CSS/themes/grafana/grafana-base.css?sha=4dd9253",
"addons": {}
},
"jackett": {
"base_css": "https://theme-park.dev/CSS/themes/jackett/jackett-base.css?sha=4dd9253",
"addons": {}
},
"nzbhydra2": {
"base_css": "https://theme-park.dev/CSS/themes/nzbhydra2/nzbhydra2-base.css?sha=4dd9253",
"addons": {}
},
"ombi": {
"base_css": "https://theme-park.dev/CSS/themes/ombi/ombi-base.css?sha=4dd9253",
"addons": {}
},
"dozzle": {
"base_css": "https://theme-park.dev/CSS/themes/dozzle/dozzle-base.css?sha=4dd9253",
"addons": {}
},
"lazylibrarian": {
"base_css": "https://theme-park.dev/CSS/themes/lazylibrarian/lazylibrarian-base.css?sha=4dd9253",
"addons": {}
},
"requestrr": {
"base_css": "https://theme-park.dev/CSS/themes/requestrr/requestrr-base.css?sha=4dd9253",
"addons": {}
},
"thelounge": {
"base_css": "https://theme-park.dev/CSS/themes/thelounge/thelounge-base.css?sha=4dd9253",
"addons": {}
},
"sonarr": {
"base_css": "https://theme-park.dev/CSS/themes/sonarr/sonarr-base.css?sha=4dd9253",
"addons": {
"sonarr-4k-logo": {
"css": [
"https://theme-park.dev/CSS/addons/sonarr/sonarr-4k-logo/sonarr-4k-logo.css?sha=4dd9253"
]
}
}
},
"portainer": {
"base_css": "https://theme-park.dev/CSS/themes/portainer/portainer-base.css?sha=4dd9253",
"addons": {}
},
"plex": {
"base_css": "https://theme-park.dev/CSS/themes/plex/plex-base.css?sha=4dd9253",
"addons": {
"overseer-side-menu": {
"css": [
"https://theme-park.dev/CSS/addons/plex/overseer-side-menu/overseer-side-menu.css?sha=4dd9253"
]
}
}
},
"filebrowser": {
"base_css": "https://theme-park.dev/CSS/themes/filebrowser/filebrowser-base.css?sha=4dd9253",
"addons": {}
},
"radarr": {
"base_css": "https://theme-park.dev/CSS/themes/radarr/radarr-base.css?sha=4dd9253",
"addons": {
"radarr-4k-logo": {
"css": [
"https://theme-park.dev/CSS/addons/radarr/radarr-4k-logo/radarr-4k-logo.css?sha=4dd9253"
]
}
}
},
"xbackbone": {
"base_css": "https://theme-park.dev/CSS/themes/xbackbone/xbackbone-base.css?sha=4dd9253",
"addons": {}
},
"calibreweb": {
"base_css": "https://theme-park.dev/CSS/themes/calibreweb/calibreweb-base.css?sha=4dd9253",
"addons": {}
},
"qbittorrent": {
"base_css": "https://theme-park.dev/CSS/themes/qbittorrent/qbittorrent-base.css?sha=4dd9253",
"addons": {}
},
"guacamole": {
"base_css": "https://theme-park.dev/CSS/themes/guacamole/guacamole-base.css?sha=4dd9253",
"addons": {}
},
"webtools": {
"base_css": "https://theme-park.dev/CSS/themes/webtools/webtools-base.css?sha=4dd9253",
"addons": {}
},
"monitorr": {
"base_css": "https://theme-park.dev/CSS/themes/monitorr/monitorr-base.css?sha=4dd9253",
"addons": {}
},
"lidarr": {
"base_css": "https://theme-park.dev/CSS/themes/lidarr/lidarr-base.css?sha=4dd9253",
"addons": {}
},
"jellyfin": {
"base_css": "https://theme-park.dev/CSS/themes/jellyfin/jellyfin-base.css?sha=4dd9253",
"addons": {}
},
"flood": {
"base_css": "https://theme-park.dev/CSS/themes/flood/flood-base.css?sha=4dd9253",
"addons": {}
},
"tautulli": {
"base_css": "https://theme-park.dev/CSS/themes/tautulli/tautulli-base.css?sha=4dd9253",
"addons": {}
},
"readarr": {
"base_css": "https://theme-park.dev/CSS/themes/readarr/readarr-base.css?sha=4dd9253",
"addons": {
"readarr-alt-logo": {
"css": [
"https://theme-park.dev/CSS/addons/readarr/readarr-alt-logo/readarr-alt-logo.css?sha=4dd9253"
]
}
}
}
},
"addons": {
"unraid": {
"login-page": {
"alien": {
"css": [
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/green.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/white.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/red.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/blue.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/custom.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/amber.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/alien/retro-terminal-base.css?sha=4dd9253"
]
},
"fallout": {
"css": [
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/green.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/white.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/red.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/blue.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/custom.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/amber.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/fallout/retro-terminal-base.css?sha=4dd9253"
]
},
"retro-terminal": {
"css": [
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/green.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/white.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/red.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/blue.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/custom.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/amber.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/unraid/login-page/retro-terminal/retro-terminal-base.css?sha=4dd9253"
]
}
}
},
"organizr": {
"glass": {
"css": [
"https://theme-park.dev/CSS/addons/organizr/glass/glass-login.css?sha=4dd9253",
"https://theme-park.dev/CSS/addons/organizr/glass/glass-base.css?sha=4dd9253"
]
}
},
"bazarr": {
"bazarr-4k-logo": {
"css": [
"https://theme-park.dev/CSS/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css?sha=4dd9253"
]
}
},
"sonarr": {
"sonarr-4k-logo": {
"css": [
"https://theme-park.dev/CSS/addons/sonarr/sonarr-4k-logo/sonarr-4k-logo.css?sha=4dd9253"
]
}
},
"plex": {
"overseer-side-menu": {
"css": [
"https://theme-park.dev/CSS/addons/plex/overseer-side-menu/overseer-side-menu.css?sha=4dd9253"
]
}
},
"radarr": {
"radarr-4k-logo": {
"css": [
"https://theme-park.dev/CSS/addons/radarr/radarr-4k-logo/radarr-4k-logo.css?sha=4dd9253"
]
}
},
"readarr": {
"readarr-alt-logo": {
"css": [
"https://theme-park.dev/CSS/addons/readarr/readarr-alt-logo/readarr-alt-logo.css?sha=4dd9253"
]
}
}
},
"themes": {
"Plex": {
"url": "https://theme-park.dev/CSS/variables/plex.css?sha=4dd9253"
},
"Organizr-dark": {
"url": "https://theme-park.dev/CSS/variables/organizr-dark.css?sha=4dd9253"
},
"Space-gray": {
"url": "https://theme-park.dev/CSS/variables/space-gray.css?sha=4dd9253"
},
"Time": {
"url": "https://theme-park.dev/CSS/variables/time.css?sha=4dd9253"
},
"Hotline": {
"url": "https://theme-park.dev/CSS/variables/hotline.css?sha=4dd9253"
},
"Soul": {
"url": "https://theme-park.dev/CSS/variables/soul.css?sha=4dd9253"
},
"Hotpink": {
"url": "https://theme-park.dev/CSS/variables/hotpink.css?sha=4dd9253"
},
"Power": {
"url": "https://theme-park.dev/CSS/variables/power.css?sha=4dd9253"
},
"Mind": {
"url": "https://theme-park.dev/CSS/variables/mind.css?sha=4dd9253"
},
"Aquamarine": {
"url": "https://theme-park.dev/CSS/variables/aquamarine.css?sha=4dd9253"
},
"Dracula": {
"url": "https://theme-park.dev/CSS/variables/dracula.css?sha=4dd9253"
},
"Space": {
"url": "https://theme-park.dev/CSS/variables/space.css?sha=4dd9253"
},
"Dark": {
"url": "https://theme-park.dev/CSS/variables/dark.css?sha=4dd9253"
},
"Overseerr": {
"url": "https://theme-park.dev/CSS/variables/overseerr.css?sha=4dd9253"
},
"Reality": {
"url": "https://theme-park.dev/CSS/variables/reality.css?sha=4dd9253"
},
"Onedark": {
"url": "https://theme-park.dev/CSS/variables/onedark.css?sha=4dd9253"
}
}
}

85
themes.py Normal file
View File

@ -0,0 +1,85 @@
from os import listdir
from os.path import isdir, isfile, join
from json import dump,dumps, loads
import argparse
def create_addons_json(sha):
ADDONS = {"addons":{}}
addon_root = './CSS/addons'
addon_folders = [name for name in listdir(addon_root) if isdir(join(addon_root, name))]
for app in addon_folders:
app_addons = [addon for addon in listdir(f"{addon_root}/{app}")]
ADDONS["addons"].update({
app: {
addon: {} for addon in app_addons
}
})
for addon in app_addons:
files = [file for file in listdir(
f"{addon_root}/{app}/{addon}") if isfile(join(f"{addon_root}/{app}/{addon}", file))]
ADDONS["addons"].update({
app: {
addon: {
"css": [f"https://{DOMAIN}/CSS/addons/{app}/{addon}/{file}?sha={sha}" for file in files if file.split(".")[1] == "css"]
}
}
})
extra_dirs = [dir for dir in listdir(
f"{addon_root}/{app}/{addon}") if isdir(join(f"{addon_root}/{app}/{addon}", dir))]
if extra_dirs:
for dir in extra_dirs:
extra_dir_files = [file for file in listdir(
f"{addon_root}/{app}/{addon}/{dir}") if isfile(join(f"{addon_root}/{app}/{addon}/{dir}", file))]
ADDONS["addons"][app].update({
addon: {
dir: {
"css": [f"https://{DOMAIN}/CSS/addons/{app}/{addon}/{dir}/{extra_file}?sha={sha}" for extra_file in extra_dir_files if extra_file.split(".")[1] == "css"]
} for dir in extra_dirs
}
})
return dumps(ADDONS)
def create_json(sha,app_folders:list=None,themes:list=None,no_sub_folders=False):
if no_sub_folders:
THEMES = {}
for theme in themes:
THEMES.update({
"themes": {
theme.split(".")[0].capitalize(): {
"url": f"https://{DOMAIN}/CSS/variables/{theme}?sha={sha}"
}for theme in themes
}
})
return dumps(THEMES)
else:
ADDONS = loads(create_addons_json(sha))
APPS = {"applications":{}}
for app in app_folders:
APPS.update({
"applications":{
app: {
"base_css": f"https://{DOMAIN}/CSS/themes/{app}/{app}-base.css?sha={sha}",
"addons": ADDONS["addons"][app] if app in ADDONS["addons"] else {}
} for app in app_folders
}
}
)
THEMES = loads(create_json(sha,themes=themes,no_sub_folders=True))
APPS.update(ADDONS)
APPS.update(THEMES)
return dumps(APPS)
if __name__== "__main__":
parser = argparse.ArgumentParser("Creates a JSON file with some information on all applications and themes")
parser.add_argument("--sha", required=True, help="This is the commit SHA we use for 'versioning' on CSS files")
args = parser.parse_args()
sha = args.sha
app_folders = [name for name in listdir('./CSS/themes') if isdir(join('./CSS/themes', name))]
themes = [name for name in listdir('./CSS/variables') if isfile(join('./CSS/variables', name))]
DOMAIN = open("CNAME","rt",closefd=True).readline()
apps = loads(create_json(sha,app_folders,themes))
with open("themes.json", "w") as outfile:
dump(apps, outfile,indent=2)