Files
wpep/tools/gp/docs/diagrams/build-js-workflow.svg
T

1 line
8.9 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="650" height="660" viewBox="0 0 650 660" role="img"><title>build-js-workflow</title><metadata>&lt;mxGraphModel adaptiveColors=&quot;auto&quot; pageWidth=&quot;650&quot; pageHeight=&quot;660&quot;&gt;&lt;root&gt;&lt;mxCell id=&quot;0&quot; /&gt;&lt;mxCell id=&quot;1&quot; parent=&quot;0&quot; /&gt;&lt;mxCell id=&quot;ir&quot; value=&quot;HtmlDocument&amp;lt;br&amp;gt;章节 HTML 与布局&quot; style=&quot;rounded=1;whiteSpace=wrap;html=1;fillColor=#d9eee8;strokeColor=#52716b;fontSize=14;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;40&quot; y=&quot;30&quot; width=&quot;230&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;assemble&quot; value=&quot;DocuBuilder.as_html_page()&amp;lt;br&amp;gt;嵌入图片 · 组装 HTML · PDF 标记&quot; style=&quot;rounded=1;whiteSpace=wrap;html=1;fillColor=#d9eee8;strokeColor=#52716b;fontSize=14;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;40&quot; y=&quot;160&quot; width=&quot;230&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;disabled&quot; value=&quot;build_js_script = false&amp;lt;br&amp;gt;直接返回组装 HTML&quot; style=&quot;rounded=1;whiteSpace=wrap;html=1;fillColor=#fff0cf;strokeColor=#52716b;fontSize=14;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;360&quot; y=&quot;160&quot; width=&quot;230&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;dom&quot; value=&quot;启用脚本:读取文件并解析 DOM&amp;lt;br&amp;gt;注入 html / document / pages / cfg&quot; style=&quot;rounded=1;whiteSpace=wrap;html=1;fillColor=#e5e4f5;strokeColor=#52716b;fontSize=14;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;40&quot; y=&quot;290&quot; width=&quot;230&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;run&quot; value=&quot;同步执行 build.js&amp;lt;br&amp;gt;修改 DOM 或显式 return 字符串&quot; style=&quot;rounded=1;whiteSpace=wrap;html=1;fillColor=#e5e4f5;strokeColor=#52716b;fontSize=14;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;40&quot; y=&quot;420&quot; width=&quot;230&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;serialize&quot; value=&quot;默认序列化 documentElement&amp;lt;br&amp;gt;无 DOM 时回退 html&quot; style=&quot;rounded=1;whiteSpace=wrap;html=1;fillColor=#d9eee8;strokeColor=#52716b;fontSize=14;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;360&quot; y=&quot;420&quot; width=&quot;230&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;output&quot; value=&quot;继续导出 PDF / HTML / MD / TXT&amp;lt;br&amp;gt;EPUB 不经过此钩子&quot; style=&quot;rounded=1;whiteSpace=wrap;html=1;fillColor=#fff0cf;strokeColor=#52716b;fontSize=14;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&lt;mxGeometry x=&quot;360&quot; y=&quot;550&quot; width=&quot;230&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;e0&quot; source=&quot;ir&quot; target=&quot;assemble&quot; edge=&quot;1&quot; parent=&quot;1&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;endArrow=block;&quot;&gt;&lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;e1&quot; source=&quot;assemble&quot; target=&quot;disabled&quot; edge=&quot;1&quot; parent=&quot;1&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;endArrow=block;&quot;&gt;&lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;e2&quot; source=&quot;assemble&quot; target=&quot;dom&quot; edge=&quot;1&quot; parent=&quot;1&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;endArrow=block;&quot;&gt;&lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;e3&quot; source=&quot;dom&quot; target=&quot;run&quot; edge=&quot;1&quot; parent=&quot;1&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;endArrow=block;&quot;&gt;&lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;e4&quot; source=&quot;run&quot; target=&quot;serialize&quot; edge=&quot;1&quot; parent=&quot;1&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;endArrow=block;&quot;&gt;&lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;e5&quot; source=&quot;serialize&quot; target=&quot;output&quot; edge=&quot;1&quot; parent=&quot;1&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;endArrow=block;&quot;&gt;&lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;mxCell id=&quot;e6&quot; source=&quot;disabled&quot; target=&quot;output&quot; edge=&quot;1&quot; parent=&quot;1&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;endArrow=block;&quot;&gt;&lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&lt;/mxCell&gt;&lt;/root&gt;&lt;/mxGraphModel&gt;</metadata><defs><marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto"><path d="M0,0 L9,3 L0,6" fill="#52716b"/></marker></defs><rect width="100%" height="100%" fill="#fafdfb"/><path d="M155,110 V135.0 H155 V160" fill="none" stroke="#52716b" stroke-width="2" marker-end="url(#arrow)"/><path d="M270,200 H315.0 V200 H360" fill="none" stroke="#52716b" stroke-width="2" marker-end="url(#arrow)"/><path d="M155,240 V265.0 H155 V290" fill="none" stroke="#52716b" stroke-width="2" marker-end="url(#arrow)"/><path d="M155,370 V395.0 H155 V420" fill="none" stroke="#52716b" stroke-width="2" marker-end="url(#arrow)"/><path d="M270,460 H315.0 V460 H360" fill="none" stroke="#52716b" stroke-width="2" marker-end="url(#arrow)"/><path d="M475,500 V525.0 H475 V550" fill="none" stroke="#52716b" stroke-width="2" marker-end="url(#arrow)"/><path d="M475,240 V395.0 H475 V550" fill="none" stroke="#52716b" stroke-width="2" marker-end="url(#arrow)"/><rect x="40" y="30" width="230" height="80" rx="12" fill="#d9eee8" stroke="#52716b"/><text x="155" y="59.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">HtmlDocument</text><text x="155" y="81.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">章节 HTML 与布局</text><rect x="40" y="160" width="230" height="80" rx="12" fill="#d9eee8" stroke="#52716b"/><text x="155" y="189.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">DocuBuilder.as_html_page()</text><text x="155" y="211.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">嵌入图片 · 组装 HTML · PDF 标记</text><rect x="360" y="160" width="230" height="80" rx="12" fill="#fff0cf" stroke="#52716b"/><text x="475" y="189.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">build_js_script = false</text><text x="475" y="211.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">直接返回组装 HTML</text><rect x="40" y="290" width="230" height="80" rx="12" fill="#e5e4f5" stroke="#52716b"/><text x="155" y="319.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">启用脚本:读取文件并解析 DOM</text><text x="155" y="341.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">注入 html / document / pages / cfg</text><rect x="40" y="420" width="230" height="80" rx="12" fill="#e5e4f5" stroke="#52716b"/><text x="155" y="449.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">同步执行 build.js</text><text x="155" y="471.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">修改 DOM 或显式 return 字符串</text><rect x="360" y="420" width="230" height="80" rx="12" fill="#d9eee8" stroke="#52716b"/><text x="475" y="449.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">默认序列化 documentElement</text><text x="475" y="471.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">无 DOM 时回退 html</text><rect x="360" y="550" width="230" height="80" rx="12" fill="#fff0cf" stroke="#52716b"/><text x="475" y="579.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">继续导出 PDF / HTML / MD / TXT</text><text x="475" y="601.0" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="14" fill="#18332e">EPUB 不经过此钩子</text></svg>