diff --git a/maloja/__init__.py b/maloja/__init__.py index b255fe9..7940e5c 100644 --- a/maloja/__init__.py +++ b/maloja/__init__.py @@ -12,8 +12,8 @@ requires = [ "lesscpy>=0.13" ] resources = [ - "website/*/*", - "website/*", + "web/*/*", + "web/*", "data_files/*/*", "data_files/.doreah" ] diff --git a/maloja/server.py b/maloja/server.py index 6e014d5..9b4181f 100755 --- a/maloja/server.py +++ b/maloja/server.py @@ -46,7 +46,7 @@ MAIN_PORT = settings.get_settings("WEB_PORT") HOST = settings.get_settings("HOST") THREADS = 12 BaseRequest.MEMFILE_MAX = 15 * 1024 * 1024 -WEBFOLDER = pkg_resources.resource_filename(__name__,"website") +WEBFOLDER = pkg_resources.resource_filename(__name__,"web") webserver = Bottle() @@ -58,8 +58,8 @@ pthjoin = os.path.join #for f in os.listdir(pthjoin(WEBFOLDER,"less")): # css += lesscpy.compile(pthjoin(WEBFOLDER,"less",f)) -#os.makedirs("website/css",exist_ok=True) -#with open("website/css/style.css","w") as f: +#os.makedirs("web/css",exist_ok=True) +#with open("web/css/style.css","w") as f: # f.write(css) @@ -215,9 +215,9 @@ def static_html(name): # If a python file exists, it provides the replacement dict for the html file if os.path.exists(pthjoin(WEBFOLDER,name + ".py")): - #txt_keys = SourceFileLoader(name,"website/" + name + ".py").load_module().replacedict(keys,DATABASE_PORT) + #txt_keys = SourceFileLoader(name,"web/" + name + ".py").load_module().replacedict(keys,DATABASE_PORT) try: - module = importlib.import_module(".website." + name,package="maloja") + module = importlib.import_module(".web." + name,package="maloja") txt_keys,resources = module.instructions(keys) except Exception as e: log("Error in website generation: " + str(sys.exc_info()),module="error") @@ -242,7 +242,7 @@ def static_html(name): response.set_header("Link",",".join(linkheaders)) log("Generated page " + name + " in " + str(clock.stop()) + "s (Python+HTML)",module="debug") return html - #return static_file("website/" + name + ".html",root="") + #return static_file("web/" + name + ".html",root="") # Shortlinks diff --git a/maloja/website/admin.pyhp b/maloja/web/admin.pyhp similarity index 100% rename from maloja/website/admin.pyhp rename to maloja/web/admin.pyhp diff --git a/maloja/website/artist.html b/maloja/web/artist.html similarity index 100% rename from maloja/website/artist.html rename to maloja/web/artist.html diff --git a/maloja/website/artist.py b/maloja/web/artist.py similarity index 100% rename from maloja/website/artist.py rename to maloja/web/artist.py diff --git a/maloja/website/artist.pyhp b/maloja/web/artist.pyhp similarity index 100% rename from maloja/website/artist.pyhp rename to maloja/web/artist.pyhp diff --git a/maloja/website/charts_artists.html b/maloja/web/charts_artists.html similarity index 100% rename from maloja/website/charts_artists.html rename to maloja/web/charts_artists.html diff --git a/maloja/website/charts_artists.py b/maloja/web/charts_artists.py similarity index 100% rename from maloja/website/charts_artists.py rename to maloja/web/charts_artists.py diff --git a/maloja/website/charts_tracks.html b/maloja/web/charts_tracks.html similarity index 100% rename from maloja/website/charts_tracks.html rename to maloja/web/charts_tracks.html diff --git a/maloja/website/charts_tracks.py b/maloja/web/charts_tracks.py similarity index 100% rename from maloja/website/charts_tracks.py rename to maloja/web/charts_tracks.py diff --git a/maloja/website/common/footer.html b/maloja/web/common/footer.html similarity index 100% rename from maloja/website/common/footer.html rename to maloja/web/common/footer.html diff --git a/maloja/website/common/header.html b/maloja/web/common/header.html similarity index 100% rename from maloja/website/common/header.html rename to maloja/web/common/header.html diff --git a/maloja/website/compare.html b/maloja/web/compare.html similarity index 100% rename from maloja/website/compare.html rename to maloja/web/compare.html diff --git a/maloja/website/compare.py b/maloja/web/compare.py similarity index 100% rename from maloja/website/compare.py rename to maloja/web/compare.py diff --git a/maloja/website/css/style.css b/maloja/web/css/style.css similarity index 100% rename from maloja/website/css/style.css rename to maloja/web/css/style.css diff --git a/maloja/website/errors/generic.html b/maloja/web/errors/generic.html similarity index 100% rename from maloja/website/errors/generic.html rename to maloja/web/errors/generic.html diff --git a/maloja/website/favicon.ico b/maloja/web/favicon.ico similarity index 100% rename from maloja/website/favicon.ico rename to maloja/web/favicon.ico diff --git a/maloja/website/favicon.png b/maloja/web/favicon.png similarity index 100% rename from maloja/website/favicon.png rename to maloja/web/favicon.png diff --git a/maloja/website/issues.html b/maloja/web/issues.html similarity index 100% rename from maloja/website/issues.html rename to maloja/web/issues.html diff --git a/maloja/website/issues.py b/maloja/web/issues.py similarity index 100% rename from maloja/website/issues.py rename to maloja/web/issues.py diff --git a/maloja/website/javascript/cookies.js b/maloja/web/javascript/cookies.js similarity index 100% rename from maloja/website/javascript/cookies.js rename to maloja/web/javascript/cookies.js diff --git a/maloja/website/javascript/datechange.js b/maloja/web/javascript/datechange.js similarity index 100% rename from maloja/website/javascript/datechange.js rename to maloja/web/javascript/datechange.js diff --git a/maloja/website/javascript/neopolitan.js b/maloja/web/javascript/neopolitan.js similarity index 100% rename from maloja/website/javascript/neopolitan.js rename to maloja/web/javascript/neopolitan.js diff --git a/maloja/website/javascript/rangeselect.js b/maloja/web/javascript/rangeselect.js similarity index 100% rename from maloja/website/javascript/rangeselect.js rename to maloja/web/javascript/rangeselect.js diff --git a/maloja/website/javascript/search.js b/maloja/web/javascript/search.js similarity index 100% rename from maloja/website/javascript/search.js rename to maloja/web/javascript/search.js diff --git a/maloja/website/javascript/upload.js b/maloja/web/javascript/upload.js similarity index 100% rename from maloja/website/javascript/upload.js rename to maloja/web/javascript/upload.js diff --git a/maloja/website/less/grisons.less b/maloja/web/less/grisons.less similarity index 100% rename from maloja/website/less/grisons.less rename to maloja/web/less/grisons.less diff --git a/maloja/website/less/grisonsfont.less b/maloja/web/less/grisonsfont.less similarity index 100% rename from maloja/website/less/grisonsfont.less rename to maloja/web/less/grisonsfont.less diff --git a/maloja/website/less/maloja.less b/maloja/web/less/maloja.less similarity index 99% rename from maloja/website/less/maloja.less rename to maloja/web/less/maloja.less index 992c414..a4b8b19 100644 --- a/maloja/website/less/maloja.less +++ b/maloja/web/less/maloja.less @@ -1,4 +1,4 @@ -@import "website/less/grisons"; +@import "web/less/grisons"; body { padding:15px; diff --git a/maloja/website/manual.html b/maloja/web/manual.html similarity index 100% rename from maloja/website/manual.html rename to maloja/web/manual.html diff --git a/maloja/website/media/chartpos_bronze.png b/maloja/web/media/chartpos_bronze.png similarity index 100% rename from maloja/website/media/chartpos_bronze.png rename to maloja/web/media/chartpos_bronze.png diff --git a/maloja/website/media/chartpos_gold.png b/maloja/web/media/chartpos_gold.png similarity index 100% rename from maloja/website/media/chartpos_gold.png rename to maloja/web/media/chartpos_gold.png diff --git a/maloja/website/media/chartpos_normal.png b/maloja/web/media/chartpos_normal.png similarity index 100% rename from maloja/website/media/chartpos_normal.png rename to maloja/web/media/chartpos_normal.png diff --git a/maloja/website/media/chartpos_silver.png b/maloja/web/media/chartpos_silver.png similarity index 100% rename from maloja/website/media/chartpos_silver.png rename to maloja/web/media/chartpos_silver.png diff --git a/maloja/website/media/record_diamond.png b/maloja/web/media/record_diamond.png similarity index 100% rename from maloja/website/media/record_diamond.png rename to maloja/web/media/record_diamond.png diff --git a/maloja/website/media/record_gold.png b/maloja/web/media/record_gold.png similarity index 100% rename from maloja/website/media/record_gold.png rename to maloja/web/media/record_gold.png diff --git a/maloja/website/media/record_gold_original.png b/maloja/web/media/record_gold_original.png similarity index 100% rename from maloja/website/media/record_gold_original.png rename to maloja/web/media/record_gold_original.png diff --git a/maloja/website/media/record_platinum.png b/maloja/web/media/record_platinum.png similarity index 100% rename from maloja/website/media/record_platinum.png rename to maloja/web/media/record_platinum.png diff --git a/maloja/website/media/star.png b/maloja/web/media/star.png similarity index 100% rename from maloja/website/media/star.png rename to maloja/web/media/star.png diff --git a/maloja/website/media/star_alt.png b/maloja/web/media/star_alt.png similarity index 100% rename from maloja/website/media/star_alt.png rename to maloja/web/media/star_alt.png diff --git a/maloja/website/performance.html b/maloja/web/performance.html similarity index 100% rename from maloja/website/performance.html rename to maloja/web/performance.html diff --git a/maloja/website/performance.py b/maloja/web/performance.py similarity index 100% rename from maloja/website/performance.py rename to maloja/web/performance.py diff --git a/maloja/website/proxy.html b/maloja/web/proxy.html similarity index 100% rename from maloja/website/proxy.html rename to maloja/web/proxy.html diff --git a/maloja/website/proxy.py b/maloja/web/proxy.py similarity index 100% rename from maloja/website/proxy.py rename to maloja/web/proxy.py diff --git a/maloja/website/pulse.html b/maloja/web/pulse.html similarity index 100% rename from maloja/website/pulse.html rename to maloja/web/pulse.html diff --git a/maloja/website/pulse.py b/maloja/web/pulse.py similarity index 100% rename from maloja/website/pulse.py rename to maloja/web/pulse.py diff --git a/maloja/website/robots.txt b/maloja/web/robots.txt similarity index 100% rename from maloja/website/robots.txt rename to maloja/web/robots.txt diff --git a/maloja/website/scrobbles.html b/maloja/web/scrobbles.html similarity index 100% rename from maloja/website/scrobbles.html rename to maloja/web/scrobbles.html diff --git a/maloja/website/scrobbles.py b/maloja/web/scrobbles.py similarity index 100% rename from maloja/website/scrobbles.py rename to maloja/web/scrobbles.py diff --git a/maloja/website/setup.html b/maloja/web/setup.html similarity index 100% rename from maloja/website/setup.html rename to maloja/web/setup.html diff --git a/maloja/website/setup.py b/maloja/web/setup.py similarity index 100% rename from maloja/website/setup.py rename to maloja/web/setup.py diff --git a/maloja/website/start.html b/maloja/web/start.html similarity index 100% rename from maloja/website/start.html rename to maloja/web/start.html diff --git a/maloja/website/start.py b/maloja/web/start.py similarity index 100% rename from maloja/website/start.py rename to maloja/web/start.py diff --git a/maloja/website/top_artists.html b/maloja/web/top_artists.html similarity index 100% rename from maloja/website/top_artists.html rename to maloja/web/top_artists.html diff --git a/maloja/website/top_artists.py b/maloja/web/top_artists.py similarity index 100% rename from maloja/website/top_artists.py rename to maloja/web/top_artists.py diff --git a/maloja/website/top_tracks.html b/maloja/web/top_tracks.html similarity index 100% rename from maloja/website/top_tracks.html rename to maloja/web/top_tracks.html diff --git a/maloja/website/top_tracks.py b/maloja/web/top_tracks.py similarity index 100% rename from maloja/website/top_tracks.py rename to maloja/web/top_tracks.py diff --git a/maloja/website/track.html b/maloja/web/track.html similarity index 100% rename from maloja/website/track.html rename to maloja/web/track.html diff --git a/maloja/website/track.py b/maloja/web/track.py similarity index 100% rename from maloja/website/track.py rename to maloja/web/track.py diff --git a/maloja/website/track.pyhp b/maloja/web/track.pyhp similarity index 100% rename from maloja/website/track.pyhp rename to maloja/web/track.pyhp diff --git a/maloja/website/wait.html b/maloja/web/wait.html similarity index 100% rename from maloja/website/wait.html rename to maloja/web/wait.html