Open
Conversation
新增图文/视频发布选项,图文和视频命令均支持: **publish.py** - `_set_collection` — 选择合集(div.collection-plugin-button) - `_set_content_type` — 内容类型声明下拉 - `_set_location` — 地点搜索(d-select + 键盘输入触发 Vue 响应式) - `_set_attachment` — 附件上传(input[accept*=".pdf"]) - `_set_toggle_switch` — 通用开关(合拍/复制) - `_apply_publish_options` — 统一入口,图文和视频共享 - `inspect_publish_page` — 调试用 DOM 探测命令 - fix: 标签光标定位改用 JS range.collapse(false) 替代硬编码 20x ArrowDown **types.py** - `PublishImageContent` / `PublishVideoContent` 各加 6 个字段: allow_duet, allow_copy, collection, content_type, location, attachment_path **publish_video.py** - 导入并调用 `_apply_publish_options`,支持全部新选项 **cli.py** - publish/fill-publish/publish-video/fill-publish-video 各加: --no-duet, --no-copy, --collection, --content-type, --location, --attachment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
之前 _set_location 只选第一个可见结果,导致"慕尼黑"出现在末尾时 选到错误选项。现在收集所有可见结果,依次尝试精确匹配 → 包含匹配 → 回退第一个,确保选中正确地点。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
顶部已有 import json,直接使用即可。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 将 title_utils 和 os 提升为模块级导入,移除函数内延迟导入 - 为视频发布表单添加标题长度校验(与图文一致) - 改进 _set_content_type 选择器,优先 class 匹配,回退叶子节点 - cli.py 中 getattr 替换为直接属性访问(参数已注册) - 移除未使用的 inspect_publish_page 调试函数和 UPLOAD_CONTENT 导入 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- SKILL.md: 补充 publish-article 子命令文档及分步长文发布说明 - cli.py: 新增 publish-article 命令,支持 --title-file/--content-file/--description-file/--images/--template-name 参数 - publish_long_article.py: 新增 publish_long_article_full() 串联完整发布流程(填内容→选模板→填描述→发布) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: feat: 发布选项(合集、地点、附件、开关)+ code review 修复
Body:
Summary
_apply_publish_options统一图文/视频发布选项逻辑🤖 Generated with Claude Code