diff --git a/Dockerfile b/Dockerfile index 11a7ebd..d74f8f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ FROM python:latest as builder -COPY ./dx_static_convert_toml_to_json.py . -COPY ./public/tmp_wait_for_json_editor.toml . +WORKDIR /builder +COPY . /builder RUN apt-get update && apt-get install -y python3-pip \ - && pip install toml \ - && python -u ./dx_static_convert_toml_to_json.py + && bash build_static.sh FROM nginx:alpine -COPY ./public /usr/share/nginx/html/ -COPY --from=builder swift.json /usr/share/nginx/html/ +COPY --from=builder /builder/public /usr/share/nginx/html/ EXPOSE 80 diff --git a/build_static.sh b/build_static.sh new file mode 100644 index 0000000..966a576 --- /dev/null +++ b/build_static.sh @@ -0,0 +1,2 @@ +pip install toml +python -u ./dx_static_convert_toml_to_json.py diff --git a/dx_static_convert_toml_to_json.py b/dx_static_convert_toml_to_json.py index a343ae1..5515ac4 100644 --- a/dx_static_convert_toml_to_json.py +++ b/dx_static_convert_toml_to_json.py @@ -5,8 +5,8 @@ print(">>>> BEGIN: Convert toml to json >>>>") try: - with open("./tmp_wait_for_json_editor.toml", "r", encoding="utf8") as f_toml: - with open("./swift.json", "w", encoding="utf8") as f_json: + with open("./public/tmp_wait_for_json_editor.toml", "r", encoding="utf8") as f_toml: + with open("./public/swift.json", "w", encoding="utf8") as f_json: json.dump(toml.load(f_toml), f_json, ensure_ascii=False) print("SUCCESS") except: diff --git a/public/all.json b/public/all.json index 85efbc3..6122e27 100644 --- a/public/all.json +++ b/public/all.json @@ -156,7 +156,7 @@ "updatedAt": "2022-04-15 17:45:45", "objectId": "z1rxDCCD", "ACL": null, - "content": "久等了,旦夕 1.4.2 已经发布。这次更新是最近影响使用体验的 Bug 的修复集合。\nAndroid 用户请直接点击下面的按钮跳转官网下载;iOS/iPadOS 用户请等待 App Store 提示更新后,在商店中更新。", + "content": "DanXi 1.4.4 已经发布。这次更新包含了一批最近反馈的重大 bug 的紧急修复。\n注意:由于服务器遭受长期的 DDoS 攻击,必须在校园网环境(或使用 EasyConnect VPN)才能正常下载。Android 用户请直接点击下面的按钮跳转官网下载,也可以直接用浏览器访问 danxi.fduhole.com,选择「项目」-「校园助手」以下载。", "maxVersion": -3 }, { @@ -164,7 +164,7 @@ "updatedAt": "2022-04-15 17:45:48", "objectId": "s7f2B22B", "ACL": null, - "content": "1.4.2", + "content": "1.4.4", "maxVersion": -2 }, { diff --git a/public/tmp_wait_for_json_editor.toml b/public/tmp_wait_for_json_editor.toml index b6f4971..3dd852e 100644 --- a/public/tmp_wait_for_json_editor.toml +++ b/public/tmp_wait_for_json_editor.toml @@ -2,7 +2,10 @@ user_agent = "Safari is the best!" stop_words = [ "蝻", "郭楠", "锅男", "蝈楠", "国钕", "下头", "普信男", "普信女", "普且信", "奇趣蛋", "钓鱼", "硬钓", "巨婴", "烂裤裆", "好裤裆", "裤裆鉴定", "小仙女", "婊子", "多少沾点", "差不多得了", "傻逼", "啥比", "傻b", "伞兵", "傻卵", "啊对对对", "弱智", "脑瘫", "急了急了", "有病", "😅", "粉蛆", "小粉红", "傻宝", "神蛆", "神神", "兔兔", "约炮", "贵物", "石砸狗叫", "石砸🐶叫", "⛵", "勾八", "勾8", "j8", "崽种", "原批", "舟舟人", "粥粥人", "农批", "农p", "原p", "😘", "睿智", "丈育", "🤪", "你妈的", "几把", "好似", "好死", "烧鸡", "骚鸡", "管好你自己",] change_log = "久等了,旦夕 1.4.2 已经发布。这次更新是最近影响使用体验的 Bug 的修复集合。\nAndroid 用户请直接点击下面的按钮跳转官网下载;iOS/iPadOS 用户请等待 App Store 提示更新后,在商店中更新。" -banners = [] +[[banners]] +title = "茶楼猫猫表情包使用情况调研" +actionName = "参与调研 /ᐠ. ᴗ.ᐟ\ /☆" +action = "https://danxi-dev.feishu.cn/share/base/form/shrcnIukeNE7wnYNDeRrfLbSQy5" [semester_start_date] 487 = "2025-01-17" @@ -31,5 +34,5 @@ date = "04-01" words = [ "为斯卡蒂献上心脏!", "嘉然今天吃掉了你的脑子", "蒙古上单大战帝国海军", "旦夕挖矿中……", "日→月↘光↗华↘共↘灿↘烂↗↗↗↗", "啊♂一起来van游戏", "禀报管理员,树洞驾崩啦———", "旦夕将在24h内使您的手机爆炸,请做好准备", "扫码看管理员女装", "美的洗衣机是吧", "来吐槽我的LJ室友", "[成人本升专]联系电话:110", "😅+电风扇==😄", "我命令你GPA4.0", "就算大雨让这座城市颠倒,我也要去刷锻", "是包吃饭比较慢你没等他吗", "美赛=全国大学生美术大赛", "英雄联盟设计师!你知道我的痛楚吗", "东方是什么动漫啊", "当旦夕加载不出时,你很火大", "ko ko da yo", "阿伟,你又在刷树洞哦", "你这瓜保熟吗", "发生什么是了", "我能被十个打", "性感管理员,在线封号", "炫酷置顶,十元每月", "旅 馆 大 酬 宾", "你是蚌?", "《年青大学生惨遭十位导师轮流布置作业》.avi", "班长,车子已经准备好了", "希望の花~",] [latest_version] -swift = "2.0.0" -flutter = "1.4.2" +swift = "2.0.6" +flutter = "1.4.4"