feat: Release v0.10 - Modular Architecture & External Config
- Refactor codebase into src/ (preprocessing, translation, assembly) - Add pipeline/ scripts for individual stages - Externalize configuration to config/config.yaml - Fix Cover Image preservation - Update documentation and manuals
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import re
|
||||
from src.format_extractor import FormatExtractor
|
||||
|
||||
# 模拟带换行的 HTML
|
||||
html_with_newlines = """
|
||||
in the name of
|
||||
<span id="page_vi"></span>
|
||||
abundance...
|
||||
"""
|
||||
|
||||
extractor = FormatExtractor()
|
||||
clean_text, text_with_ph, _, _, _ = extractor.extract(f"<p>{html_with_newlines}</p>")
|
||||
|
||||
print(f"Original HTML: {repr(html_with_newlines)}")
|
||||
print(f"Clean Text: {repr(clean_text)}")
|
||||
print(f"Text with PH: {repr(text_with_ph)}")
|
||||
print(f"Has Newline: {'\\n' in text_with_ph}")
|
||||
print("-" * 20)
|
||||
|
||||
# 模拟 Prompt 构建
|
||||
prompt_line = f"p_00006 [BODY] {text_with_ph}"
|
||||
print("Prompt Line Preview:")
|
||||
print(prompt_line)
|
||||
Reference in New Issue
Block a user