feat: 阅读页与章节预览 API;管理端内容页;book/h5_read;脚本与文档

- miniprogram: read 页与 member-detail/my;SOP 文档
- soul-api: chapter_preview、book/h5_read 调整;VIP 订单回填 SQL
- soul-admin: ContentPage、dist
- scripts: pull_from_baota;content_upload、gitignore、对话规则

Made-with: Cursor
This commit is contained in:
卡若
2026-03-26 20:08:43 +08:00
parent d6c8aabbe8
commit 6aa0d27da1
19 changed files with 1825 additions and 130 deletions

View File

@@ -10,6 +10,7 @@ from __future__ import annotations
import argparse
import importlib.util
import re
import sys
from pathlib import Path
@@ -44,15 +45,17 @@ def strip_md_title_line(text: str) -> str:
def for_miniprogram_body(text: str) -> str:
"""上传 README少用 --- 分割线;正文内独立一行的 --- 改为空行分段"""
"""上传 README少用 --- 与 **独立一行的 --- 改为空行;去掉 **;压缩多余空行"""
out_lines: list[str] = []
for line in text.splitlines():
if line.strip() == "---":
out_lines.append("")
out_lines.append("")
else:
out_lines.append(line)
return "\n".join(out_lines).strip() + "\n"
body = "\n".join(out_lines)
body = body.replace("**", "")
body = re.sub(r"\n{3,}", "\n\n", body)
return body.strip() + "\n"
def next_10_id(cur) -> str: