diff --git a/Gmeek.py b/Gmeek.py index 1d27dc5..f3fb96f 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -71,7 +71,7 @@ class GMEEK(): os.mkdir(self.post_dir) def defaultConfig(self): - dconfig={"singlePage":[],"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","bottomText":"","showPostSource":1,"iconList":{},"UTC":+8,"rssMode":"sentence"} + dconfig={"singlePage":[],"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","bottomText":"","showPostSource":1,"iconList":{},"UTC":+8,"rssSplit":"sentence"} config=json.loads(open('config.json', 'r', encoding='utf-8').read()) self.blogBase={**dconfig,**config}.copy() self.blogBase["postListJson"]=json.loads('{}') @@ -283,16 +283,14 @@ class GMEEK(): if issue.body==None: self.blogBase[listJsonName][postNum]["description"]='' else: - if self.blogBase["rssMode"]=="sentence": + if self.blogBase["rssSplit"]=="sentence": if self.blogBase["i18n"]=="CN": period="。" else: period="." - self.blogBase[listJsonName][postNum]["description"]=issue.body.split(period)[0]+period - elif self.blogBase["rssMode"]=="all": - self.blogBase[listJsonName][postNum]["description"]=issue.body else: - self.blogBase[listJsonName][postNum]["description"]='' + period=self.blogBase["rssSplit"] + self.blogBase[listJsonName][postNum]["description"]=issue.body.split(period)[0]+period self.blogBase[listJsonName][postNum]["top"]=0 for event in issue.get_events():