{"id":29693819,"url":"https://github.com/faithererer/discourse-publisher","last_synced_at":"2025-07-31T03:40:41.837Z","repository":{"id":304512377,"uuid":"1018986839","full_name":"faithererer/discourse-publisher","owner":"faithererer","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-13T14:30:07.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-13T16:24:33.946Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faithererer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-13T13:49:04.000Z","updated_at":"2025-07-13T14:30:11.000Z","dependencies_parsed_at":"2025-07-13T16:24:45.088Z","dependency_job_id":"eb67e8d8-96c9-41a5-a2c3-66619d845ca3","html_url":"https://github.com/faithererer/discourse-publisher","commit_stats":null,"previous_names":["faithererer/discourse-publisher"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/faithererer/discourse-publisher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithererer%2Fdiscourse-publisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithererer%2Fdiscourse-publisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithererer%2Fdiscourse-publisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithererer%2Fdiscourse-publisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faithererer","download_url":"https://codeload.github.com/faithererer/discourse-publisher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithererer%2Fdiscourse-publisher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266640830,"owners_count":23960809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-23T08:09:23.659Z","updated_at":"2025-07-23T08:09:24.787Z","avatar_url":"https://github.com/faithererer.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discourse Publisher\n\n一个使用 WPF 和 .NET 8 构建的现代化桌面应用程序，用于批量向 Discourse 论坛发布帖子。\n\n## ✨ 功能特性\n\n- **批量发布**: 通过导入 JSON 文件，一次性发布多个帖子。\n- **元信息查询**: 内置工具，可方便地查询论坛的所有分类 (Categories) 和标签 (Tags) 及其对应的 ID。\n- **美观的 UI**: 使用 [HandyControl](https://handyorg.github.io/handycontrol/) UI 库，提供流畅、美观的用户体验。\n- **配置持久化**: 自动保存您的论坛地址和 API 凭据，无需每次都输入。\n- **可扩展的设计**: 采用 MVVM 架构和工厂模式，未来可轻松扩展以支持 Markdown、CSV 等更多导入格式。\n- **详细的日志**: 在发布过程中提供实时的进度条和详细的成功/失败日志。\n## 👀 界面截图\n\u003cimg width=\"1000\" height=\"600\" alt=\"PixPin_2025-07-14_14-23-54\" src=\"https://github.com/user-attachments/assets/8674b01d-c9bd-47b6-946a-0329ec4f942b\" /\u003e\n\u003cimg width=\"790\" height=\"496\" alt=\"PixPin_2025-07-14_14-24-34\" src=\"https://github.com/user-attachments/assets/1cb92aa3-16c6-4974-a709-5e50704e77b2\" /\u003e\n\n## 🚀 如何开始\n\n### 1. 配置\n\n首次启动时，或通过主界面的“设置”按钮，配置以下信息：\n\n- **论坛地址 (URL)**: 您的 Discourse 论坛的完整地址 (例如, `https://forums.example.com`)。\n- **API Key**: 在您的 Discourse 用户后台生成的 API 密钥。\n- **API 用户名**: 您用于生成 API 密钥的用户名。\n\n配置将自动保存在 `%AppData%\\DiscoursePublisher\\settings.json`。\n\n\n### 2. 准备帖子数据\n\n创建一个 `.json` 文件，其中包含一个帖子对象的数组。每个帖子对象应包含以下字段：\n\n- `title` (string): 帖子标题。\n- `content` (string): 帖子内容，支持 Markdown。\n- `categoryId` (int): 帖子的分类 ID。您可以通过“查询论坛信息”功能获取。\n- `tags` (array of strings): 帖子的标签列表。\n\n**示例 `posts.json`:**\n```json\n[\n  {\n    \"title\": \"探索WPF：构建现代化桌面应用的艺术\",\n    \"content\": \"本文将深入探讨 **WPF (Windows Presentation Foundation)** 的核心概念...\",\n    \"categoryId\": 10,\n    \"tags\": [\"wpf\", \"csharp\", \"mvvm\"]\n  },\n  {\n    \"title\": \"HandyControl：让你的WPF应用焕然一新\",\n    \"content\": \"介绍一个功能强大且美观的开源 WPF UI 库...\",\n    \"categoryId\": 10,\n    \"tags\": [\"wpf\", \"ui\", \"opensource\"]\n  }\n]\n```\n\n### 3. 使用\n\n1.  启动应用程序。\n2.  点击 **\"导入帖子 (JSON)\"** 按钮并选择您准备好的 `.json` 文件。\n3.  帖子列表将显示在主网格中。\n4.  点击 **\"发布所有待处理帖子\"** 按钮开始发布。\n5.  在下方的日志区域查看详细的发布结果。\n\n## 🛠️ 开发\n\n本项目使用 .NET 8 和 WPF 构建。\n\n- **构建**: `dotnet build`\n- **运行**: `dotnet run`\n\n### 项目结构\n\n- **`/Models`**: 包含应用程序的数据模型 (e.g., `Post`, `Category`, `AppSettings`)。\n- **`/Views`**: 包含所有的窗口和用户控件 (XAML)。\n- **`/ViewModels`**: 包含所有视图的视图模型，处理业务逻辑和状态管理。\n- **`/Services`**: 包含与外部服务（如 Discourse API、文件系统）交互的类。\n- **`/Converters`**: 包含在 XAML 绑定中使用的数据转换器。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaithererer%2Fdiscourse-publisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaithererer%2Fdiscourse-publisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaithererer%2Fdiscourse-publisher/lists"}