<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>工具 on Uni星人</title><link>https://unicornumr1314.github.io/tags/%E5%B7%A5%E5%85%B7/</link><description>Recent content in 工具 on Uni星人</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Sat, 21 Feb 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://unicornumr1314.github.io/tags/%E5%B7%A5%E5%85%B7/index.xml" rel="self" type="application/rss+xml"/><item><title>工具介绍：源码合并为 Word（去空行，软著专用）</title><link>https://unicornumr1314.github.io/posts/%E5%B7%A5%E5%85%B7-%E6%BA%90%E7%A0%81%E5%90%88%E5%B9%B6%E4%B8%BAword%E5%8E%BB%E7%A9%BA%E8%A1%8C/</link><pubDate>Sat, 21 Feb 2026 10:00:00 +0800</pubDate><guid>https://unicornumr1314.github.io/posts/%E5%B7%A5%E5%85%B7-%E6%BA%90%E7%A0%81%E5%90%88%E5%B9%B6%E4%B8%BAword%E5%8E%BB%E7%A9%BA%E8%A1%8C/</guid><description>&lt;p&gt;本工具用于将多份源代码文件合并为一个 Word 文档，并在合并过程中自动去除空行、统一格式。支持输入页眉文本（每页顶部左对齐显示），适合在申请软件著作权时快速生成“排版规范、紧凑清晰”的源代码文档。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;功能要点：
&lt;ul&gt;
&lt;li&gt;多文件合并（按文件名排序），可指定“起始文件”&lt;/li&gt;
&lt;li&gt;去除空行（仅空白字符的行也会删除）&lt;/li&gt;
&lt;li&gt;每个文件可选择是否从新页开始（分页）&lt;/li&gt;
&lt;li&gt;页眉文本左对齐显示于每页顶部&lt;/li&gt;
&lt;li&gt;统一格式：宋体（SimSun），字号 10 磅&lt;/li&gt;
&lt;li&gt;本地处理，不上传文件&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;适用场景：
&lt;ul&gt;
&lt;li&gt;软著申报时提交的源代码文档整理与排版&lt;/li&gt;
&lt;li&gt;将分散在多个文件中的示例代码合并为统一格式的文档&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;直接打开工具：../static/tools/源码合并为Word(去空行).html&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;使用步骤：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;打开工具页面，填写“页眉文本”（如“软件著作权-源代码文档”）。&lt;/li&gt;
&lt;li&gt;拖拽或选择多个源文件，工具会按文件名排序；可在“起始文件”下拉中设定从哪个文件开始。&lt;/li&gt;
&lt;li&gt;根据需要勾选“文件之间插入分页”，便于分卷阅读与审阅。&lt;/li&gt;
&lt;li&gt;点击“生成 Word 文档”，完成后点击“下载生成的文档”保存。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;提示：工具在浏览器端完成处理，适合隐私与合规要求较高的场景。*** End Patch***}ETwitterозяется. There was an error. Please try again.***}``` &amp;ndash;&amp;gt;&lt;/p&gt;</description></item><item><title>工具介绍：ipynb 转 md（网页版）</title><link>https://unicornumr1314.github.io/posts/%E5%B7%A5%E5%85%B7-ipynb%E8%BD%AC%E5%8C%96%E4%B8%BAmd%E7%BD%91%E9%A1%B5%E7%89%88/</link><pubDate>Sun, 30 Nov 2025 10:10:00 +0800</pubDate><guid>https://unicornumr1314.github.io/posts/%E5%B7%A5%E5%85%B7-ipynb%E8%BD%AC%E5%8C%96%E4%B8%BAmd%E7%BD%91%E9%A1%B5%E7%89%88/</guid><description>&lt;p&gt;本工具用于将 Jupyter Notebook（&lt;code&gt;.ipynb&lt;/code&gt;）内容转化为 Markdown（&lt;code&gt;.md&lt;/code&gt;）格式的网页版本，便于分享与发布。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;功能要点：浏览器端解析、生成 Markdown 文本&lt;/li&gt;
&lt;li&gt;适用场景：将 Notebook 内容迁移到博客/文档系统&lt;/li&gt;
&lt;li&gt;&lt;a href="https://unicornumr1314.github.io/tools/ipynb%e8%bd%ac%e5%8c%96%e4%b8%bamd%28%e7%bd%91%e9%a1%b5%e7%89%88%29.html" rel=""&gt;直接打开工具&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;使用方式：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;打开工具页面，导入/粘贴 Notebook 内容&lt;/li&gt;
&lt;li&gt;一键生成 Markdown 文本，复制后保存为 &lt;code&gt;.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;可根据需要手动调整图片/代码块等细节&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;提示：该工具纯前端实现，适合快速转换与分发。&lt;/p&gt;</description></item><item><title>工具介绍：B萌动漫角色票数统计</title><link>https://unicornumr1314.github.io/posts/%E5%B7%A5%E5%85%B7-b%E8%90%8C%E5%8A%A8%E6%BC%AB%E8%A7%92%E8%89%B2%E7%A5%A8%E6%95%B0%E7%BB%9F%E8%AE%A1%E5%B7%A5%E5%85%B7/</link><pubDate>Sun, 30 Nov 2025 10:05:00 +0800</pubDate><guid>https://unicornumr1314.github.io/posts/%E5%B7%A5%E5%85%B7-b%E8%90%8C%E5%8A%A8%E6%BC%AB%E8%A7%92%E8%89%B2%E7%A5%A8%E6%95%B0%E7%BB%9F%E8%AE%A1%E5%B7%A5%E5%85%B7/</guid><description>&lt;p&gt;本工具按分隔符 &lt;code&gt;》&lt;/code&gt; 将输入文本拆分为多组，自动提取每组中的“角色名 数字票”并进行累加统计。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;功能要点：分组解析、角色票数累加、错误格式提醒、结果下载&lt;/li&gt;
&lt;li&gt;适用场景：B萌/角色票数统计、分组文档快速汇总&lt;/li&gt;
&lt;li&gt;&lt;a href="https://unicornumr1314.github.io/tools/B%e8%90%8c%e5%8a%a8%e6%bc%ab%e8%a7%92%e8%89%b2%e7%a5%a8%e6%95%b0%e7%bb%9f%e8%ae%a1%e5%b7%a5%e5%85%b7.html" rel=""&gt;直接打开工具&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;使用步骤：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;将整段文本合并为一行，按 &lt;code&gt;》&lt;/code&gt; 分割为多组&lt;/li&gt;
&lt;li&gt;每组以“角色名 数字票”格式书写，如：&lt;code&gt;雪之下雪乃 3票&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;点击“确认统计（累加）”，可多次输入累加结果&lt;/li&gt;
&lt;li&gt;支持将统计结果导出为 &lt;code&gt;txt&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;示例输入：&lt;/p&gt;
&lt;div class="code-block highlight is-closed show-line-numbers tw-group tw-my-2"&gt;
 &lt;div class="
 
 tw-flex 
 tw-flex-row
 tw-flex-1 
 tw-justify-between 
 tw-w-full tw-bg-bgColor-secondary
 "&gt; 
 &lt;button 
 class="
 code-block-button
 tw-mx-2 
 tw-flex
 tw-flex-row
 tw-flex-1"
 aria-hidden="true"&gt;
 &lt;div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"&gt;&lt;svg class="icon"
 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"&gt;&lt;!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --&gt;&lt;path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/&gt;&lt;/svg&gt;&lt;/div&gt;
 &lt;p class="tw-select-none !tw-my-1"&gt;text&lt;/p&gt;</description></item><item><title>工具介绍：世萌数据统计</title><link>https://unicornumr1314.github.io/posts/%E5%B7%A5%E5%85%B7-%E4%B8%96%E8%90%8C%E6%95%B0%E6%8D%AE%E7%BB%9F%E8%AE%A1/</link><pubDate>Sun, 30 Nov 2025 10:00:00 +0800</pubDate><guid>https://unicornumr1314.github.io/posts/%E5%B7%A5%E5%85%B7-%E4%B8%96%E8%90%8C%E6%95%B0%E6%8D%AE%E7%BB%9F%E8%AE%A1/</guid><description>&lt;p&gt;本工具用于统计文本中被 &lt;code&gt;[[...]]&lt;/code&gt; 标记的内容出现频率，并支持检测 &lt;code&gt;Voter Id&lt;/code&gt; 重复。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;功能要点：统计 &lt;code&gt;[[标签]]&lt;/code&gt; 次数，检测并提醒重复的 &lt;code&gt;Voter Id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;适用场景：世萌/票选类文本统计、结果汇总&lt;/li&gt;
&lt;li&gt;&lt;a href="https://unicornumr1314.github.io/tools/%e4%b8%96%e8%90%8c%e6%95%b0%e6%8d%ae%e7%bb%9f%e8%ae%a1.html" rel=""&gt;直接打开工具&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;使用步骤：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;在输入框粘贴文本，包含 &lt;code&gt;[[标签]]&lt;/code&gt; 格式&lt;/li&gt;
&lt;li&gt;点击“确认统计”，工具会解析并汇总出现次数&lt;/li&gt;
&lt;li&gt;如检测到重复 &lt;code&gt;Voter Id&lt;/code&gt; 会提示并阻止累加&lt;/li&gt;
&lt;li&gt;可一键下载统计结果为 &lt;code&gt;txt&lt;/code&gt; 文件&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;示例输入：&lt;/p&gt;
&lt;div class="code-block highlight is-closed show-line-numbers tw-group tw-my-2"&gt;
 &lt;div class="
 
 tw-flex 
 tw-flex-row
 tw-flex-1 
 tw-justify-between 
 tw-w-full tw-bg-bgColor-secondary
 "&gt; 
 &lt;button 
 class="
 code-block-button
 tw-mx-2 
 tw-flex
 tw-flex-row
 tw-flex-1"
 aria-hidden="true"&gt;
 &lt;div class="group-[.is-open]:tw-rotate-90 tw-transition-[transform] tw-duration-500 tw-ease-in-out print:!tw-hidden tw-w-min tw-h-min tw-my-1 tw-mx-1"&gt;&lt;svg class="icon"
 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"&gt;&lt;!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --&gt;&lt;path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/&gt;&lt;/svg&gt;&lt;/div&gt;
 &lt;p class="tw-select-none !tw-my-1"&gt;text&lt;/p&gt;</description></item><item><title>MDMetaGenerator：Markdown 元信息创建生成器（带 UI）</title><link>https://unicornumr1314.github.io/posts/%E4%BD%9C%E5%93%81%E4%BB%8B%E7%BB%8D-mdmetagenerator/</link><pubDate>Sun, 23 Nov 2025 00:00:00 +0000</pubDate><guid>https://unicornumr1314.github.io/posts/%E4%BD%9C%E5%93%81%E4%BB%8B%E7%BB%8D-mdmetagenerator/</guid><description>&lt;h2 id="摘要" class="headerLink"&gt;
 &lt;a href="#%e6%91%98%e8%a6%81" class="header-mark"&gt;&lt;/a&gt;1 摘要&lt;/h2&gt;&lt;p&gt;MDMetaGenerator 是一款面向内容创作者的桌面端工具，提供图形化界面，表单化生成 Markdown 文章的 Front Matter、摘要与正文分隔（`&lt;/p&gt;</description></item><item><title>删除-docx-空行工具脚本</title><link>https://unicornumr1314.github.io/posts/%E5%88%A0%E9%99%A4-docx-%E7%A9%BA%E8%A1%8C/</link><pubDate>Wed, 12 Nov 2025 21:16:18 +0800</pubDate><guid>https://unicornumr1314.github.io/posts/%E5%88%A0%E9%99%A4-docx-%E7%A9%BA%E8%A1%8C/</guid><description>&lt;p&gt;本文介绍仓库内的脚本&lt;a href="https://unicornumr1314.github.io/tools/dele_null_line.py" rel=""&gt;源代码文件&lt;/a&gt;，它可以自动删除 &lt;code&gt;.docx&lt;/code&gt; 文档中的空段落，并在非空段落中合并连续换行（将多个连续换行替换为一个）。脚本同时会处理表格单元格内的段落。&lt;/p&gt;
&lt;p&gt;本工具最初用于在申请软件著作权时，批量清理源代码文档中的空行，让提交给软著的源代码文档更加紧凑、排版整齐，方便审核和归档。&lt;/p&gt;
&lt;p&gt;如果你不方便在本地安装 Python，也可以使用浏览器版工具：&lt;a href="../static/tools/dele_null_line.html" rel=""&gt;删除 DOCX 空行（网页版）&lt;/a&gt;，直接在网页中选择 &lt;code&gt;.docx&lt;/code&gt; 文件并下载清理后的文档。&lt;/p&gt;
&lt;p&gt;主要功能&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;删除文档正文中空的段落（完全没有可见字符的段落）。&lt;/li&gt;
&lt;li&gt;在非空段落中把连续的 &lt;code&gt;\n&lt;/code&gt; 合并为单个 &lt;code&gt;\n&lt;/code&gt;，避免多余的空行或换行符导致格式混乱。&lt;/li&gt;
&lt;li&gt;遍历文档内的表格，按单元格同样规则清理空段落并合并换行。&lt;/li&gt;
&lt;li&gt;提供简单的 Tkinter GUI，交互选择输入/输出文件路径，适合非命令行用户。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;依赖&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;使用 &lt;code&gt;python-docx&lt;/code&gt;（包名 &lt;code&gt;python-docx&lt;/code&gt;）来读写 Word 文档。仓库中的脚本示例使用 &lt;code&gt;from docx import Document&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;安装&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pip install python-docx
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;（如果要使用 live GUI，请确保当前 Python 环境包含 Tkinter。Windows 上自带标准 Python 通常包含 Tkinter。）&lt;/p&gt;
&lt;p&gt;如何使用&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;图形界面（推荐，脚本默认行为）:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;运行脚本：&lt;/p&gt;
&lt;p&gt;python 原始内容文档/dele_null_line.py&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;脚本会弹出文件选择对话框，请选择要处理的 &lt;code&gt;.docx&lt;/code&gt; 文件，并指定输出文件名。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;作为模块调用（在其他脚本中复用函数）:&lt;/p&gt;
&lt;p&gt;from 原始内容文档.dele_null_line import remove_empty_lines_from_docx
remove_empty_lines_from_docx(&amp;lsquo;input.docx&amp;rsquo;, &amp;lsquo;output.docx&amp;rsquo;)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;实现要点（供维护者参考）&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;段落处理：脚本先遍历 &lt;code&gt;doc.paragraphs&lt;/code&gt;，把纯空的段落标记删除，非空段落使用正则 &lt;code&gt;re.sub(r&amp;quot;\n+&amp;quot;,&amp;quot;\n&amp;quot;, text)&lt;/code&gt; 合并连续换行。&lt;/li&gt;
&lt;li&gt;表格处理：进入每个 &lt;code&gt;doc.tables&lt;/code&gt;，对每个单元格的 &lt;code&gt;cell.paragraphs&lt;/code&gt; 做同样的清理与合并。&lt;/li&gt;
&lt;li&gt;删除操作：对要删除的段落或单元格段落，使用底层 XML 节点 &lt;code&gt;._element.getparent().remove(...)&lt;/code&gt; 执行删除，避免改变段落集合时引发索引问题（通过反向索引删除）。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;示例场景&lt;/p&gt;</description></item></channel></rss>