wip
This commit is contained in:
parent
1ea034de17
commit
f757c5aaef
@ -6,6 +6,8 @@ from os.path import isfile, isdir
|
||||
from visualize import visualize
|
||||
from settings_manager import read_settings_file
|
||||
|
||||
version = "1.0"
|
||||
|
||||
# default settings, these are overwriteable through a config file
|
||||
settings = {
|
||||
# GENERAL
|
||||
@ -87,6 +89,7 @@ if __name__ == '__main__':
|
||||
if not isfile(config_file):
|
||||
error(f"Not a file: '{config_file}'")
|
||||
read_settings_file(config_file, settings)
|
||||
settings["version"] = version
|
||||
|
||||
if not settings["server-name"]: missing_arg("server-name")
|
||||
if not settings["access-log"]: missing_arg("log")
|
||||
|
@ -34,5 +34,6 @@
|
||||
<img src="%img_referer_ranking" alt="Referer ranking", title="Referer ranking">
|
||||
</center>
|
||||
</div>
|
||||
<p>These analytics were generated by <a href="https://git.quintern.xyz/MatthiasQuintern/regina">regina %regina_version</a></p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -340,11 +340,15 @@ def visualize(loaded_settings: dict):
|
||||
img_dir = settings["img_dir"]
|
||||
img_filetype = settings["img_filetype"]
|
||||
names = {
|
||||
# general
|
||||
"regina_version": settings["version"]
|
||||
# paths
|
||||
"img_file_ranking": f"{img_dir}/ranking_all_time_files.{img_filetype}",
|
||||
"img_referer_ranking": f"{img_dir}/ranking_all_time_referers.{img_filetype}",
|
||||
"img_browser_ranking": f"{img_dir}/ranking_all_time_browsers.{img_filetype}",
|
||||
"img_operating_system_ranking": f"{img_dir}/ranking_all_time_operating_systems.{img_filetype}",
|
||||
"img_daily": f"{img_dir}/user_request_count_daily.{img_filetype}",
|
||||
# values
|
||||
"mobile_user_percentage": 0.0,
|
||||
"server-name": settings["server-name"],
|
||||
"last_x_days": settings["last_x_days"],
|
||||
|
Loading…
Reference in New Issue
Block a user