mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
modularize src
+ merge main.py and manage.py + move start logic to swingmusic/__main__.py + add a run.py on the project root
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from swingmusic.utils.filesystem import get_home_res_path
|
||||
|
||||
|
||||
def getFlaskOpenApiPath():
|
||||
"""
|
||||
Used to retrieve the path to the flask_openapi3 package
|
||||
|
||||
See: https://github.com/luolingchun/flask-openapi3/issues/147
|
||||
"""
|
||||
site_packages_path = [p for p in sys.path if "site-packages" in p][0]
|
||||
|
||||
return f"{site_packages_path}/flask_openapi3"
|
||||
|
||||
|
||||
def getClientFilesExtensions():
|
||||
"""
|
||||
Get all the file extensions for the client files
|
||||
"""
|
||||
|
||||
client_path = get_home_res_path("client")
|
||||
|
||||
extensions = set()
|
||||
for root, dirs, files in os.walk(client_path):
|
||||
for file in files:
|
||||
ext = file.split(".")[-1]
|
||||
extensions.add("." + ext)
|
||||
|
||||
return extensions
|
||||
Reference in New Issue
Block a user