From 3de5c60d544242e74db0847ac0ff36fe8f2b7f19 Mon Sep 17 00:00:00 2001
From: Dnomd343
Date: Thu, 29 Dec 2022 22:35:50 +0800
Subject: [PATCH] update: load book name from metadata
---
src/release/calibre_html.py | 2 +-
src/release/gitbook.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/release/calibre_html.py b/src/release/calibre_html.py
index 7655e0e..04b4b5b 100755
--- a/src/release/calibre_html.py
+++ b/src/release/calibre_html.py
@@ -8,7 +8,7 @@ from common import releaseInfo
def formatMetadata(metadata: dict) -> str:
- return '栩栩若生
\n' + '\n'.join(
+ return '%s
\n' % metadata['name'] + '\n'.join(
['
%s
' % x for x in metadata['desc']] ) diff --git a/src/release/gitbook.py b/src/release/gitbook.py index 9f4b577..8963351 100755 --- a/src/release/gitbook.py +++ b/src/release/gitbook.py @@ -37,7 +37,7 @@ def loadChapters(chapters: dict) -> dict: def loadCover(metadata: dict) -> None: - cover = '---\ndescription: 作者:%s\n---\n\n# 栩栩若生\n\n' % metadata['author'] + cover = '---\ndescription: 作者:%s\n---\n\n# %s\n\n' % (metadata['author'], metadata['name']) cover += '\n\n' cover += '\n>\n'.join(['> %s' % x for x in metadata['desc']]) + '\n\n' cover += '{% embed url="https://github.com/dnomd343/xxrs-crawler.git" %}\n项目地址\n{% endembed %}\n'