diff options
| -rw-r--r-- | blog/posts/comic/meta.json | 2 | ||||
| -rw-r--r-- | blog/posts/hestia/meta.json | 2 | ||||
| -rw-r--r-- | blog/posts/let-there-be-light-theme/meta.json | 2 | ||||
| -rw-r--r-- | blog/posts/making-this-blog/meta.json | 2 | ||||
| -rw-r--r-- | blog/posts/still-working-on-this/meta.json | 2 | ||||
| -rw-r--r-- | blog/templates/blogpost.html.j2 | 2 | ||||
| -rw-r--r-- | comic/issues/1/meta.json | 2 | ||||
| -rw-r--r-- | comic/templates/issue.html.j2 | 2 | ||||
| -rw-r--r-- | modules/blogpost_processor.py | 7 | ||||
| -rw-r--r-- | modules/comic_generate.py | 5 |
10 files changed, 17 insertions, 11 deletions
diff --git a/blog/posts/comic/meta.json b/blog/posts/comic/meta.json index 57995a7..32b031f 100644 --- a/blog/posts/comic/meta.json +++ b/blog/posts/comic/meta.json @@ -1,6 +1,6 @@ { "title" : "Comics!", - "publish_date" : "2025-12-27", + "publish_date" : "2025-12-27 18:34", "tags" : [ "comic", "art" diff --git a/blog/posts/hestia/meta.json b/blog/posts/hestia/meta.json index 8fc8bfa..fd3e1c0 100644 --- a/blog/posts/hestia/meta.json +++ b/blog/posts/hestia/meta.json @@ -1,6 +1,6 @@ { "title" : "Hestia: the homemade home assistant", - "publish_date" : "2025-01-29", + "publish_date" : "2025-01-29 13:27", "tags" : [ "hestia", "voice_assistant", diff --git a/blog/posts/let-there-be-light-theme/meta.json b/blog/posts/let-there-be-light-theme/meta.json index 4b0daaa..fec1a1c 100644 --- a/blog/posts/let-there-be-light-theme/meta.json +++ b/blog/posts/let-there-be-light-theme/meta.json @@ -1,6 +1,6 @@ { "title" : "Let there be light theme...", - "publish_date" : "2024-06-23", + "publish_date" : "2024-06-23 16:23", "tags" : [ "website" ] diff --git a/blog/posts/making-this-blog/meta.json b/blog/posts/making-this-blog/meta.json index ea9eacf..1e3c5b5 100644 --- a/blog/posts/making-this-blog/meta.json +++ b/blog/posts/making-this-blog/meta.json @@ -1,6 +1,6 @@ { "title" : "Making this blog", - "publish_date" : "2024-07-03", + "publish_date" : "2024-07-03 19:22", "tags" : [ "website", "css", diff --git a/blog/posts/still-working-on-this/meta.json b/blog/posts/still-working-on-this/meta.json index 6bdd67e..107f450 100644 --- a/blog/posts/still-working-on-this/meta.json +++ b/blog/posts/still-working-on-this/meta.json @@ -1,6 +1,6 @@ { "title" : "Still working on this website", - "publish_date" : "2024-09-22", + "publish_date" : "2024-09-22 20:13", "tags" : [ "website", "css", diff --git a/blog/templates/blogpost.html.j2 b/blog/templates/blogpost.html.j2 index 7375ee4..40dc7de 100644 --- a/blog/templates/blogpost.html.j2 +++ b/blog/templates/blogpost.html.j2 @@ -9,7 +9,7 @@ <hr> <p>{{ post.get_prompt("stat -c %.10w content") }} <br> -{{ post.get_publish_time() }}</p> +{{ post.get_publish_date() }}</p> <hr> <p>{{ post.get_cat_prompt("content") }}</p> <div class="blog-content-spacer"></div> diff --git a/comic/issues/1/meta.json b/comic/issues/1/meta.json index 416f3d9..03dfd7f 100644 --- a/comic/issues/1/meta.json +++ b/comic/issues/1/meta.json @@ -1,6 +1,6 @@ { "title" : "The beginning", - "publish_date" : "2025-11-28", + "publish_date" : "2025-11-28 22:23", "description" : "I have like twenty comic ideas figured out but not the title of the series.", "extra_attributes": "title=\"There are no tooltip texts in this series.\"" } diff --git a/comic/templates/issue.html.j2 b/comic/templates/issue.html.j2 index 679b778..9d1b88a 100644 --- a/comic/templates/issue.html.j2 +++ b/comic/templates/issue.html.j2 @@ -39,7 +39,7 @@ <footer class="col-md-9"> <p>Permalink to this comic: <a href="{{ url }}">{{ url }}</a></p> <p>Image url: <a href="{{ url }}/comic.png">{{ url }}/comic.png</a></p> - <p>{{ issue.get_publish_time() }}</p> + <p>{{ issue.get_publish_date() }}</p> <hr> <a href="/feed.xml" class="icon-text" target="_blank"> <img src="/assets/image/rss.svg" class="svg-icon" /> diff --git a/modules/blogpost_processor.py b/modules/blogpost_processor.py index 39e2238..93dcfb4 100644 --- a/modules/blogpost_processor.py +++ b/modules/blogpost_processor.py @@ -111,11 +111,14 @@ class Post: def get_link(self): return urllib.parse.urljoin(Config.BLOG_ROOT_URL, self.href) + def get_publish_date(self) -> str: + return self.get_publish_time().split()[0] + def get_publish_time(self) -> str: return self.meta_data[PUBLISH_DATE_KEY] def get_publish_time_rfc2822(self) -> str: - return email.utils.format_datetime(datetime.datetime.fromisoformat(self.get_publish_time() + " 12:00+02:00")) + return email.utils.format_datetime(datetime.datetime.fromisoformat(self.get_publish_time() + "+02:00")) def get_publish_year(self) -> str: return self.meta_data[PUBLISH_DATE_KEY][0:4] @@ -168,7 +171,7 @@ class Post: for post in other_posts: lines.append("lrwxrwxrwx 1 {} {} {} {} 11:11 '{}' -> {}".format( # TODO random time and fix filename escape - Config.BLOG_OWNER, Config.BLOG_OWNER, len(post.get_fake_path()), post.get_publish_time(), post.title(), + Config.BLOG_OWNER, Config.BLOG_OWNER, len(post.get_fake_path()), post.get_publish_date(), post.title(), post.get_fake_path()) ) diff --git a/modules/comic_generate.py b/modules/comic_generate.py index ef539ba..8615f1f 100644 --- a/modules/comic_generate.py +++ b/modules/comic_generate.py @@ -31,11 +31,14 @@ class Issue: def description(self) -> str: return self.meta_data[DESCRIPTION_KEY] + def get_publish_date(self) -> str: + return self.get_publish_time().split()[0] + def get_publish_time(self) -> str: return self.meta_data[PUBLISH_DATE_KEY] def get_publish_time_rfc2822(self) -> str: - return email.utils.format_datetime(datetime.datetime.fromisoformat(self.get_publish_time() + " 12:00+02:00")) + return email.utils.format_datetime(datetime.datetime.fromisoformat(self.get_publish_time() + "+02:00")) def get_link(self) -> str: return f"{Config.COMIC_ROOT_URL}/issues/{self.index}" |
