修改static文件拷贝策略
This commit is contained in:
parent
4d9fe5ac8f
commit
600898f139
14
Gmeek.py
14
Gmeek.py
@ -79,6 +79,20 @@ class GMEEK():
|
||||
else:
|
||||
print("static not exist")
|
||||
|
||||
if os.path.exists(self.static_dir):
|
||||
for item in os.listdir(self.static_dir):
|
||||
src = os.path.join(self.static_dir, item)
|
||||
dst = os.path.join(self.root_dir, item)
|
||||
if os.path.isfile(src):
|
||||
shutil.copy(src, dst)
|
||||
print(f"Copied {item} to docs")
|
||||
elif os.path.isdir(src):
|
||||
shutil.copytree(src, dst)
|
||||
print(f"Copied directory {item} to docs")
|
||||
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":"","indexScript":"","indexStyle":"","bottomText":"","showPostSource":1,"iconList":{},"UTC":+8,"rssSplit":"sentence","exlink":{},"needComment":1}
|
||||
config=json.loads(open('config.json', 'r', encoding='utf-8').read())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user