From 376fe5bb049d2c9d61a252cb59edcdae300b4089 Mon Sep 17 00:00:00 2001 From: cuba3 Date: Mon, 2 Dec 2024 16:14:05 +0800 Subject: [PATCH] =?UTF-8?q?@kingsoen=20=E4=BF=AE=E5=A4=8D=E5=87=B6?= =?UTF-8?q?=E7=A5=9E=E5=90=89=E7=A5=9E=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20https://github.com/OPN48/cnlunar/issues/40?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 源自早期数据集只有god,没有分angel和demon --- README.md | 2 ++ cnlunar/lunar.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2812e79..b061d42 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ @JeremyYoungCai (https://github.com/JeremyYoungCai) issues/37 +@kingsoen (https://github.com/kingsoen) issues/40 + 其他与本项目关联项目: @m11v 的 Dart/Flutter版本 https://github.com/m11v/chinese_lunar_calendar diff --git a/cnlunar/lunar.py b/cnlunar/lunar.py index 3d36164..638282a 100644 --- a/cnlunar/lunar.py +++ b/cnlunar/lunar.py @@ -1089,7 +1089,8 @@ def nothingGood(dic): # pass # 仍注忌 ----> 不对badThing进行操作 # 凡天狗寅日忌祭祀,不注宜求福、祈嗣。 - if '天狗' in self.goodGodName or '寅' in d: + # @kingsoen https://github.com/OPN48/cnlunar/issues/40 + if '天狗' in self.badGodName or '寅' in d: self.badThing = rfAdd(self.badThing, addList=['祭祀']) self.goodThing = rfRemove(self.goodThing, removeList=['祭祀']) @@ -1208,7 +1209,9 @@ def nothingGood(dic): if '四忌' in self.badGodName or '四穷' in self.badGodName: self.badThing = rfAdd(self.badThing, addList=['安葬']) self.goodThing = rfRemove(self.goodThing, removeList=['破土', '启攒']) - if '鸣吠' in self.badGodName or '鸣吠对' in self.badGodName: + # @kingsoen https://github.com/OPN48/cnlunar/issues/40 + # 关联修改 + if '鸣吠' in self.goodGodName or '鸣吠对' in self.goodGodName: self.goodThing = rfRemove(self.goodThing, removeList=['破土', '启攒']) # 凡天吏、大时不以死败论者,遇四废、岁薄、逐阵仍以死败论。 # 凡岁薄、逐阵日所宜事,照月厌所忌删,所忌仍从本日。、