曦远 (DealiAxy)一份私人的文字刊物

StarBlog
返回文章列表折页手记阅读全文
StarBlog番外

starblog-publisher 2.x Refactor

After two months of dragging it out, the 2.x refactor is finally here—CLI, Core, and GUI split cleanly, all to keep up with the Agent trend. WeChat article formatting got wired in along the way, so publishing efficiency is at least passable. 3.x will probably slip again; energy always has to be split across too many directions.

曦远 (DealiAxy)约 7 分钟
目录8 个章节

Preface

Recently I've been continuously refactoring StarBlog publisher. This article should have gone out two months ago, but I kept putting it off and forgot 😂

If I don't post this now, the brand-new UI 3.x is about to ship—better get this out quickly.

Open source: https://github.com/star-blog/starblog-publisher/tree/v2.3.4

New Architecture

To meet current Agent usage needs, a lot of GUI software is going fully "CLI-ified". In the 2.0 refactor, I also split the original StarBlog Publisher into multiple libraries: CLI, Core, GUI

Shared business logic was extracted into the Core package, and both CLI and GUI are built on top of Core.

I also provide Skill and MCP so Agents can use it—now you can publish an article with a single sentence inside an Agent.

Besides the architecture changes, a major new feature is WeChat article formatting. I'd already implemented this in the wechat-pub project, but that was a Python version that only exposed MCP for Agents to call, and it wasn't well integrated with the StarBlog workflow. This time they're connected, so publishing efficiency improved a bit.

CLI

The command-line tool supports the same features as the GUI.

dotnet run --project .\StarBlogPublisher.Cli   
Required command was not provided.

Description:
  StarBlog Publisher CLI - 博客发布命令行工具

Usage:
  StarBlogPublisher.Cli [command] [options]

Options:
  -?, -h, --help  Show help and usage information
  --version       Show version information

Commands:
  auth      认证管理
  category  分类管理
  post      文章管理
  ai        AI 辅助功能
  install   安装 StarBlog Publisher 的 skills 或 MCP 配置到 AI Agent

Main Interface

Enough talk—here's a screenshot.

image-20260917200240322

Publish Result Screen

Added a publish result page so you can easily copy the URL and markdown.

image-20260917200729282

Official Account Formatting & Publishing

You can configure WeChat Official Account details in the settings screen.

image-20260917200335176

There's also a dedicated formatting screen. The 2.x version at the time lets you pick from 4 formatting themes; wechat-pub has 20+ in full, but this time I only ported a few commonly used ones.

image-20260917200255397

Here's the formatted result.

image-20260917200317663

New About Screen

This is just an update to the tech stack description. The icon hasn't been changed yet, so it still looks pretty ugly.

image-20260917200418839

Wrap-up

That's it. There's a lot going on and it's easy to get spread thin. I had planned to ship a new version of StarBlog in this period as well, but development has been much slower than I expected.

_EOF_

starblog-publisher 2.x Refactor

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

StarBlog番外(4) 文章一键发布工具Publisher大升级,AI功能增强与界面优化

《StarBlogPublisher》是一款提升博客与公众号文章创作效率的工具。作者在原有版本基础上进行了多项优化,包括界面调整(空间利用率更高、统一Font Awesome图标)及功能增强(新增文章Slug配置、独立的AI配置窗口、多组AI配置文件管理)。新功能支持AI模型动态加载、API Key灵活切换,显著提升大模型创作效率。作者计划持续开发AI辅助工具以解放生产力。

2025-05-18 · StarBlog番外 · 约 1 分钟

StarBlog 番外篇 (2) 深入解析Markdig源码,优化ToC标题提取和文章目录树生成逻辑

本文介绍了作者在开发博客发布工具时,针对Markdown目录生成逻辑的改进。作者深入研究了Markdig源码,优化了目录生成逻辑,使用AutoIdentifiers扩展自动生成标题ID,提高了代码的可维护性和准确性。文章详细解析了Markdig的heading处理部分和ID生成机制,并提供了解决ID冲突的方法。最终,作者实现了与Markdig一致的ToC提取功能。

2025-03-25 · StarBlog番外 · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…