From bab374d17f8b9144895faf9fe625b04a0212883b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Reuh=20Fildadut?= Date: Thu, 9 Oct 2025 16:55:28 +0200 Subject: [PATCH] feat: rename time -> datetime in config --- config.default.toml | 4 ++-- main.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.default.toml b/config.default.toml index 49f385f..8d2e76f 100644 --- a/config.default.toml +++ b/config.default.toml @@ -16,7 +16,7 @@ data = "data" reader = "reader" [html] -# HTML template used for generating item HTML files. +# HTML template used for generating item HTML files. All templates are Jinja2 templates. template = ''' @@ -47,7 +47,7 @@ max_filename_length = 250 # Table mapping characters to what they will be replaced with in filenames. Useful to remove/replace characters that are not allowed in filename by your filesystem. The default should be fine for most Unix filesystems. filename_replacement = { "/" = "⧸", "\u0000" = "" } -[time] +[datetime] # Which timezone to use when writing date and time. timezone = "Etc/UTC" # How date and time are formatted. See https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior for the supported codes. diff --git a/main.py b/main.py index 0987f6e..7b9e24e 100644 --- a/main.py +++ b/main.py @@ -44,8 +44,8 @@ class Config: self.server_user: str = str(get_config("server", "user", False)) self.server_password: str = str(get_config("server", "password", False)) self.items_per_query: int = int(get_config("server", "items_per_request")) - self.timezone: ZoneInfo = ZoneInfo(get_config("time", "timezone")) - self.time_format: str = str(get_config("time", "format")) + self.timezone: ZoneInfo = ZoneInfo(get_config("datetime", "timezone")) + self.time_format: str = str(get_config("datetime", "format")) self.item_template: Template = Template(get_config("html", "template"), autoescape=True) self.item_filename_template: Template = Template(get_config("html", "filename_template"), autoescape=False) self.max_filename_length: int = int(get_config("html", "max_filename_length"))