aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sjdbmk/cal.py19
-rw-r--r--[-rwxr-xr-x]sjdbmk/daily.py (renamed from daily.py)38
-rwxr-xr-xsjdbmk/pack.py (renamed from pack.py)0
-rw-r--r--sjdbmk/twa.py19
-rw-r--r--templates/template.html2
5 files changed, 59 insertions, 19 deletions
diff --git a/sjdbmk/cal.py b/sjdbmk/cal.py
index 92f1044..0d57711 100644
--- a/sjdbmk/cal.py
+++ b/sjdbmk/cal.py
@@ -1,3 +1,22 @@
+#!/usr/bin/env python3
+#
+# Calendar Interpretation in the Songjiang Daily Bulletin Build System
+# Copyright (C) 2024 Runxi Yu <https://runxiyu.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
from typing import Any
import datetime
diff --git a/daily.py b/sjdbmk/daily.py
index 1963060..9bf7529 100755..100644
--- a/daily.py
+++ b/sjdbmk/daily.py
@@ -196,28 +196,28 @@ def generate(
logger.info("Finished processing inspirations")
logger.info("Starting On This Day")
- on_this_day_html_en: typing.Optional[str]
- try:
- with open("otd_en-%s.html" % datetime_target.strftime("%m-%d"), "r") as fd:
- on_this_day_html_en = fd.read()
- except FileNotFoundError:
- on_this_day_html_en = None
- logger.warning("On This Day English not found")
- on_this_day_html_zh: typing.Optional[str]
- try:
- with open("otd_zh-%s.html" % datetime_target.strftime("%m-%d"), "r") as fd:
- on_this_day_html_zh = fd.read()
- except FileNotFoundError:
- on_this_day_html_zh = None
- logger.warning("On This Day Chinese not found")
- logger.info("Finished On This Day")
+ on_this_day_html_en = ""
+ on_this_day_html_zh = ""
+ # on_this_day_html_en: typing.Optional[str]
+ # try:
+ # with open("otd_en-%s.html" % datetime_target.strftime("%m-%d"), "r") as fd:
+ # on_this_day_html_en = fd.read()
+ # except FileNotFoundError:
+ # logger.warning("On This Day English not found")
+ # on_this_day_html_zh: typing.Optional[str]
+ # try:
+ # with open("otd_zh-%s.html" % datetime_target.strftime("%m-%d"), "r") as fd:
+ # on_this_day_html_zh = fd.read()
+ # except FileNotFoundError:
+ # logger.warning("On This Day Chinese not found")
+ # logger.info("Finished On This Day")
- # logger.info("Starting In The News")
- # in_the_news_html_en = legacy_wikipedia.get_in_the_news_en()
- # in_the_news_html_zh = legacy_wikipedia.get_in_the_news_zh()
- # logger.info("Finished In The News")
in_the_news_html_en = ""
in_the_news_html_zh = ""
+ # logger.info("Starting In The News")
+ # in_the_news_html_en = legacy_wikipedia.get_in_the_news_en()
+ # in_the_news_html_zh = legacy_wikipedia.get_in_the_news_zh()
+ # logger.info("Finished In The News")
data = {
"stddate": datetime_target.strftime("%Y-%m-%d"),
diff --git a/pack.py b/sjdbmk/pack.py
index 192cd09..192cd09 100755
--- a/pack.py
+++ b/sjdbmk/pack.py
diff --git a/sjdbmk/twa.py b/sjdbmk/twa.py
index 7c937cc..34f00a5 100644
--- a/sjdbmk/twa.py
+++ b/sjdbmk/twa.py
@@ -1,3 +1,22 @@
+#!/usr/bin/env python3
+#
+# The Week Ahead Interpretation in the Songjiang Daily Bulletin Build System
+# Copyright (C) 2024 Runxi Yu <https://runxiyu.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
import logging
import datetime
import os
diff --git a/templates/template.html b/templates/template.html
index cf7eea5..f13919b 100644
--- a/templates/template.html
+++ b/templates/template.html
@@ -170,6 +170,7 @@
</table>
{% endif %}
<h2>Delicious Dinings 今日佳肴</h2>
+ {#
<table id="menu">
<colgroup>
<col style="width: 5%">
@@ -420,6 +421,7 @@
<p class="ps">Note: The machine-readable menus emailed to the Daily Bulletin staff do not contain end-of-week dinner and weekend meals.</p>
{% endif %}
<p class="ps">I am aware that the menu currently looks a bit ugly; I am not experienced in webpage layout at all. HTML/CSS experts wanted!</p>
+ #}
<h2>Daily Inspiration 每日灵感</h2>
{% if inspiration_type %}