diff --git a/OUT_FOLDER/24421123-c073-4951-a5f0-2e0aeaffa525.svg b/OUT_FOLDER/24421123-c073-4951-a5f0-2e0aeaffa525.svg
new file mode 100644
index 0000000000000..8380f97881e20
--- /dev/null
+++ b/OUT_FOLDER/24421123-c073-4951-a5f0-2e0aeaffa525.svg
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/OUT_FOLDER/d1b1b0ab-adbd-490c-9720-f35e8dd3b15d.svg b/OUT_FOLDER/d1b1b0ab-adbd-490c-9720-f35e8dd3b15d.svg
deleted file mode 100644
index 0a611dbd2025c..0000000000000
--- a/OUT_FOLDER/d1b1b0ab-adbd-490c-9720-f35e8dd3b15d.svg
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/scripts/book.py b/scripts/book.py
index 6ac55c1f1e057..5baa1bb3e974e 100644
--- a/scripts/book.py
+++ b/scripts/book.py
@@ -112,6 +112,9 @@ def insert_book_to_notion(books, index, bookId):
for x in book.get("categories")
]
properties = utils.get_properties(book, book_properties_type_dict)
+ # 调用函数移除逗号
+ properties = remove_commas_from_select_options(properties)
+
if book.get("时间"):
notion_helper.get_date_relation(
properties,
@@ -184,6 +187,21 @@ def insert_to_notion(page_id, timestamp, duration, book_database_id):
icon=utils.get_icon("https://www.notion.so/icons/target_red.svg"),
properties=properties,
)
+def remove_commas_from_select_options(properties):
+ """
+ 遍历属性字典中的所有值,移除 select 和 multi_select 字段中的逗号。
+ """
+ for key, value in properties.items():
+ if isinstance(value, dict):
+ if "select" in value:
+ # 移除 select 字段中的逗号
+ value["select"]["name"] = value["select"]["name"].replace(",", "")
+ elif "multi_select" in value:
+ # 对 multi_select 字段的每一项进行处理
+ value["multi_select"] = [
+ {"name": option["name"].replace(",", "")} for option in value["multi_select"]
+ ]
+ return properties
if __name__ == "__main__":
diff --git a/scripts/weread.py b/scripts/weread.py
index 4c714a1d1c072..b184bdff4ec8d 100644
--- a/scripts/weread.py
+++ b/scripts/weread.py
@@ -270,7 +270,7 @@ def append_blocks_to_notion(id, blocks, after, contents):
if books != None:
for index, book in enumerate(books):
bookId = book.get("bookId")
- title = book.get("book").get("title")
+ title = book.get("book").get("title").replace(",", "") # 去掉书籍标题中的逗号
sort = book.get("sort")
if bookId not in notion_books:
continue