From 72df0007a96b324aef3ff88e9e50d0a4204b2085 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Thu, 25 Jul 2024 16:40:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=A2=9Elabel?= =?UTF-8?q?=E6=97=A0=E9=A2=9C=E8=89=B2=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gmeek.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Gmeek.py b/Gmeek.py index 0f9179a..4464f25 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -52,9 +52,8 @@ def __init__(self,options): for label in self.repo.get_labels(): self.labelColorDict[label.name]='#'+label.color print(self.labelColorDict) - self.defaultConfig() - + def cleanFile(self): workspace_path = os.environ.get('GITHUB_WORKSPACE') if os.path.exists(workspace_path+"/"+self.backup_dir): @@ -86,7 +85,6 @@ def cleanFile(self): else: print("static does not exist") - def defaultConfig(self): dconfig={"singlePage":[],"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","themeMode":"manual","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","head":"","indexScript":"","indexStyle":"","bottomText":"","showPostSource":1,"iconList":{},"UTC":+8,"rssSplit":"sentence","exlink":{},"needComment":1,"allHead":""} config=json.loads(open('config.json', 'r', encoding='utf-8').read()) @@ -465,8 +463,8 @@ def createFileName(self,issue,useLabel=False): oldBlogBase=json.loads(f.read()) for key, value in oldBlogBase.items(): blog.blogBase[key] = value - f.close() + blog.blogBase["labelColorDict"]=blog.labelColorDict blog.runOne(options.issue_number) listFile=open("blogBase.json","w")