Releases: LinYunerr/Journal-Sync
Releases · LinYunerr/Journal-Sync
Release list
1.0.9
[1.0.9] - 2026-09-08
Added
- 发送日志(
JournalSync-Log):每次发布都会在插件目录send-log/下保存一份快照(内容、图片、目标预设、诊断信息),最多保留最近 10 条。JournalSync-Log命令打开日志弹窗,可对任意一条记录点「重新编辑」,恢复内容与图片后再次发布。派发前失败(未发出)也会记录。 - Telegram Markdown→HTML 转换:新增
src/core/telegram-markdown.js,基于@borodin/mdgram将 Obsidian Markdown 统一转换为 Telegram HTML(普通链路 classic HTML、富文本链路 Rich HTML),替代原先的parse_mode=Markdown与手写富文本拼装。 - Send log (
JournalSync-Log):every publish saves a snapshot (content, images, target preset, diagnostics) undersend-log/in the plugin directory, keeping the latest 10 entries. TheJournalSync-Logcommand opens a log modal; any entry can be re-edited and re-sent with content and images restored. Failed pre-dispatch attempts are recorded too. - Telegram Markdown→HTML conversion:new
src/core/telegram-markdown.jsbased on@borodin/mdgramconverts Obsidian Markdown to Telegram HTML uniformly (classic HTML for the plain path, Rich HTML for the rich path), replacing the oldparse_mode=Markdownand hand-built rich-text assembly.
Changed
- 核心逻辑收拢到
src/core/:统一 MIME 类型推断(图片+视频)到src/core/mime.js,共享 multipart 表单构造到src/core/multipart.js,消除 mastodon/missky/notion/telegram/payload 中重复的getMimeType与重复的表单构造。纯逻辑(日记文件名/标题、vault 路径、图片引用解析、富文本草稿、内容提取、设置合并)从src/main.js迁出到src/core/独立模块,src/main.js只保留生命周期与调度。行为不变。 - 核心规则补测试:新增
tests/core.test.js,覆盖图片 token 匹配、设置深度合并、日记文件名/标题占位符、MIME、multipart。npm test同时运行 Bluesky 与 core 两套测试。 - Telegram 发送改用 HTML 解析模式:
sendMessage、sendPhoto与sendMediaGroup的文本与图片说明统一经 Markdown→HTML 转换后以parse_mode=HTML发送;标题/列表等 Markdown 块级语法在普通链路降级为加粗/圆点,富文本链路保留完整标签。新增tests/telegram-markdown.test.js覆盖行内格式、转义、引用、代码块与图片 token 还原。 - 中英文双语界面(i18n):新增
uiLanguage设置(auto跟随 Obsidian 语言,或手动 zh/en)。发送面板、设置页、日志弹窗与全部适配器文案接入翻译引擎,manifest.name在消费点统一翻译;跨适配器同文案冲突按平台前缀区分。 - 跨平台发送并行化:通用适配器并发执行;telegram(单次调用、频道在 adapter 内并行)与 mastodon(账号串行)作为并行组运行。调度逻辑收拢到
src/core/send-dispatcher.js,新增tests/send-dispatcher.test.js(20 例)。 - 附件大小预检优化:优先读取文件元数据(
TFile.stat.size/Blob.size),仅元数据缺失时回退读取完整二进制;单适配器内检查并行执行。 - 编辑器粘贴优化:非图片内容统一以纯文本插入,避免网页/Word 复制内容因富文本丢失换行。
- Core logic consolidated into
src/core/:unified MIME inference (image+video) insrc/core/mime.jsand shared multipart body construction insrc/core/multipart.js, removing duplicatedgetMimeTypeand form builders across mastodon/missky/notion/telegram/payload. Pure logic (diary filename/heading, vault paths, image-ref parsing, rich-draft, content extraction, settings merge) moved out ofsrc/main.jsinto standalonesrc/core/modules;src/main.jskeeps only lifecycle and orchestration. No behavior change. - Core rules now tested:new
tests/core.test.jscovers image-token matching, settings deep-merge, diary filename/heading placeholders, MIME and multipart.npm testruns it alongside the Bluesky suite. - Telegram sends with HTML parse mode:text and captions of
sendMessage/sendPhoto/sendMediaGroupare converted via Markdown→HTML and sent withparse_mode=HTML; block-level syntax (headings/lists) degrades to bold/bullets on the plain path and keeps full tags on the rich path. Newtests/telegram-markdown.test.jscovers inline formatting, escaping, quotes, code blocks and image-token restoration. - Bilingual UI (i18n):new
uiLanguagesetting (autofollows Obsidian's language, or zh/en). Send modal, settings page, log modal and all adapter messages are wired into the translation engine;manifest.nameis translated at every consumption point; cross-adapter duplicate strings are platform-prefixed. - Parallel cross-platform sends:generic adapters run concurrently; telegram (single call, channels in parallel inside the adapter) and mastodon (accounts serial) run as parallel groups. Dispatch logic consolidated in
src/core/send-dispatcher.js, covered bytests/send-dispatcher.test.js(20 cases). - Faster attachment size pre-check:file metadata (
TFile.stat.size/Blob.size) is read first; full-buffer read is only a fallback. Checks within one adapter run in parallel. - Paste handling:non-image pastes are inserted as plain text only, so web/Word formatted content can no longer lose newlines.
Fixed
- Telegram 引用与代码块内容丢失:修复 Markdown→HTML 转换中两个内容丢失缺陷——围栏代码块(
```/~~~)内以>开头的行被误当作引用提取而丢失;引用紧贴正文(无空行分隔)时占位符被解析器吞掉导致引用内容整体丢失。现在围栏感知 + 占位符空行隔离,引用与代码内容完整保留。 - 部分渠道发送图片时不再附带相机 emoji:微博纯图片微博空正文由
📷占位改为空格;Mastodon 空正文时不再发送status: '📷',仅发送图片。 - Telegram quote/code-block content loss:two Markdown→HTML conversion defects fixed — lines starting with
>inside fenced code blocks were wrongly extracted as quotes and lost; quotes adjacent to body text (no blank line) had their placeholder swallowed, dropping the whole quote. Now fence-aware with blank-line placeholder isolation. - No more camera emoji when sending images on some platforms:Weibo image-only posts use a space placeholder instead of
📷; Mastodon omits thestatusfield entirely for image-only posts.
1.0.8
[1.0.8] - 2026-09-04
Added
- Threads 适配器上线:注册 Threads (Meta) 适配器,支持通过 Threads Graph API 发布纯文本。设置页面提供完整 OAuth 授权流程(打开授权页 → 粘贴 code → 换取长期 Token),支持测试连接与回复权限配置。
1.0.7
[1.0.7] - 2026-09-04
Added
- Bluesky 适配器:通过 AT Protocol (XRPC) 发布文本和图片到 Bluesky。支持 App Password 认证、链接 facet
解析、grapheme cluster 与 UTF-8 字节双重限制校验、最多 4 张图片(单张 ≤ 1MB 硬限制)。配套单元测试
tests/bluesky.test.js。 - 微博适配器:通过微博开放平台 OAuth2.0 授权码模式认证,支持文本和单图发送(
statuses/update/
statuses/upload)、长文模式(is_longtext=1)、5MB 图片预警、常见错误码中文提示。设置页提供完整的「打开授权页 → 粘贴
code → 换取 Token」流程。 - Threads 适配器(未注册):基于 Threads Graph API 的纯文本发布适配器(Phase 1),支持 OAuth2.0 长期 token
自动刷新、回复权限控制、发布配额查询。代码已就绪但尚未在ADAPTER_MODULES中注册,后续版本激活。 - 测试连接功能:flomo、Mastodon、Misskey、Notion 适配器新增「测试连接」按钮,可在设置页一键验证 API 凭据是否有效。
- CHANGELOG.md:新增变更日志,后续每个版本都会记录更新说明。GitHub Release 的 Release Notes 将自动从此文件提取。
- Ctrl/Cmd+Enter 快捷发送:发送对话框中可用
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Full Changelog: https://github.com/LinYunerr/Jourbal-Sync/commits/1.0.0