mirror of
https://codeberg.org/Reuh/feather.git
synced 2025-10-27 10:09:32 +00:00
feat: rename time -> datetime in config
This commit is contained in:
parent
f40afbcb7a
commit
bab374d17f
2 changed files with 4 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ data = "data"
|
||||||
reader = "reader"
|
reader = "reader"
|
||||||
|
|
||||||
[html]
|
[html]
|
||||||
# HTML template used for generating item HTML files.
|
# HTML template used for generating item HTML files. All templates are Jinja2 templates.
|
||||||
template = '''
|
template = '''
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
|
|
@ -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.
|
# 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" = "" }
|
filename_replacement = { "/" = "⧸", "\u0000" = "" }
|
||||||
|
|
||||||
[time]
|
[datetime]
|
||||||
# Which timezone to use when writing date and time.
|
# Which timezone to use when writing date and time.
|
||||||
timezone = "Etc/UTC"
|
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.
|
# How date and time are formatted. See https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior for the supported codes.
|
||||||
|
|
|
||||||
4
main.py
4
main.py
|
|
@ -44,8 +44,8 @@ class Config:
|
||||||
self.server_user: str = str(get_config("server", "user", False))
|
self.server_user: str = str(get_config("server", "user", False))
|
||||||
self.server_password: str = str(get_config("server", "password", False))
|
self.server_password: str = str(get_config("server", "password", False))
|
||||||
self.items_per_query: int = int(get_config("server", "items_per_request"))
|
self.items_per_query: int = int(get_config("server", "items_per_request"))
|
||||||
self.timezone: ZoneInfo = ZoneInfo(get_config("time", "timezone"))
|
self.timezone: ZoneInfo = ZoneInfo(get_config("datetime", "timezone"))
|
||||||
self.time_format: str = str(get_config("time", "format"))
|
self.time_format: str = str(get_config("datetime", "format"))
|
||||||
self.item_template: Template = Template(get_config("html", "template"), autoescape=True)
|
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.item_filename_template: Template = Template(get_config("html", "filename_template"), autoescape=False)
|
||||||
self.max_filename_length: int = int(get_config("html", "max_filename_length"))
|
self.max_filename_length: int = int(get_config("html", "max_filename_length"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue