flomo-memo-to-markdown
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFlomo Memo To Markdown
Flomo备忘录转Markdown
Overview
概述
Convert flomo memos into Markdown files grouped by time range and generate with both and per tag node.
tag-stats.mddirect_counttotal_countThis is a standalone export skill. It is not a CRUD helper and should not be used for interactive "find one memo and edit it" requests.
Default behavior is optimized for fast one-shot processing from the local flomo desktop login state: full date range, monthly split, filenames, and .
{{user}}_{{range}}asset-mode=placeholder将flomo备忘录转换为按时间范围分组的Markdown文件,并生成每个标签节点同时包含和的文件。
direct_counttotal_counttag-stats.md这是一个独立的导出Skill,不是CRUD辅助工具,不应用于响应“查找单条备忘录并编辑”这类交互式请求。
默认行为针对从本地flomo桌面端登录状态进行快速一次性处理做了优化:全日期范围、按月拆分、文件名格式、。
{{user}}_{{range}}asset-mode=placeholderPreconditions
前置条件
- has been logged in on this Mac before
flomo.app - Local flomo storage exists under
~/Library/Containers/com.flomoapp.m/... - Network access to flomo API is available if using the local source
- 此Mac设备此前已登录过
flomo.app - 本地flomo存储存在于路径下
~/Library/Containers/com.flomoapp.m/... - 若使用本地数据源,需可正常访问flomo API网络
Quick Start
快速开始
Set the script path from the current environment instead of hardcoding a user directory:
bash
SKILL_ROOT="${CODEX_HOME:-$HOME/.codex}/skills/flomo-memo-to-markdown"
SCRIPT="$SKILL_ROOT/scripts/flomo_to_nblm.py"Examples:
bash
python3 "$SCRIPT"
python3 "$SCRIPT" --preview-only
python3 "$SCRIPT" --split quarter --asset-mode copy从当前环境设置脚本路径,不要硬编码用户目录:
bash
SKILL_ROOT="${CODEX_HOME:-$HOME/.codex}/skills/flomo-memo-to-markdown"
SCRIPT="$SKILL_ROOT/scripts/flomo_to_nblm.py"使用示例:
bash
python3 "$SCRIPT"
python3 "$SCRIPT" --preview-only
python3 "$SCRIPT" --split quarter --asset-mode copyDefault Agent Workflow
默认Agent工作流
- Use the local flomo API source.
- If any local API read step fails, fail fast and return error immediately.
- Do not fall back to cached exports.
- Do not ask for exported HTML unless the user explicitly requests postprocessing an archive.
- Run with defaults unless the user specifies date range / split / naming / asset handling.
- Report output directory, generated Markdown file count, per-file memo/char counts, threshold warnings, and the path.
tag-stats.md
- 使用本地flomo API数据源
- 若任意本地API读取步骤失败,快速终止并立即返回错误
- 不回退到缓存的导出文件
- 除非用户明确要求对归档文件进行后处理,否则不请求导出的HTML文件
- 除非用户指定日期范围/拆分规则/命名规则/资源处理方式,否则使用默认参数运行
- 上报输出目录、生成的Markdown文件数量、单文件备忘录/字符计数、阈值警告,以及文件路径
tag-stats.md
When To Ask Follow-Up Questions
何时需要询问后续问题
Ask only when one of these materially changes execution:
- The user wants a custom date range
- The user wants a different split granularity
- The user wants a custom filename template
- The user wants copied attachments or explicitly wants to ignore attachments
- Local desktop auth is missing or broken
仅当以下情况会实质性影响执行结果时才需要询问:
- 用户需要自定义日期范围
- 用户需要不同的拆分粒度
- 用户需要自定义文件名模板
- 用户需要复制附件或者明确要求忽略附件
- 本地桌面认证缺失或失效
Output Behavior
输出行为
- Default output is decompressed Markdown files
- Also writes in export mode
tag-stats.md - performs parsing, filtering, grouping, and tag stats only
--preview-only - is treated as a character count threshold
--word-limit
- 默认输出为未压缩的Markdown文件
- 导出模式下还会生成文件
tag-stats.md - 参数仅执行解析、过滤、分组和标签统计操作
--preview-only - 参数会被视为字符计数阈值
--word-limit
Local Source Semantics
本地数据源语义
- Default input is the local flomo desktop login state, not exported HTML
- The script reads the local desktop auth token from
~/Library/Containers/com.flomoapp.m/.../leveldb - Memo bodies come from flomo API HTML and are rendered to Markdown
content - Memo timestamps come from
created_at - Attachments come from memo
files - Tags are re-derived from rendered Markdown text using syntax
#tag
- 默认输入为本地flomo桌面端登录状态,而非导出的HTML文件
- 脚本会从路径读取本地桌面认证token
~/Library/Containers/com.flomoapp.m/.../leveldb - 备忘录内容来自flomo API返回的HTML,会被渲染为Markdown格式
content - 备忘录时间戳来自字段
created_at - 附件来自备忘录的字段
files - 标签会使用语法从渲染后的Markdown文本中重新提取
#tag
Attachment Modes
附件模式
- (default): Append attachment path lines to memo Markdown; do not copy files
placeholder - : Ignore attachments entirely
ignore - : Download signed attachment URLs into
copyunder the output directory and rewrite Markdown referencesassets/
- (默认):在备忘录Markdown末尾追加附件路径行,不复制文件
placeholder - :完全忽略附件
ignore - :将签名后的附件URL下载到输出目录下的
copy文件夹中,并重写Markdown引用assets/
Tag Statistics Semantics
标签统计语义
- Tags are extracted from memo plain text using syntax
#tag - Counting is deduped per memo
- : memos tagged with this exact tag
direct_count - :
total_countplus all descendant tagsdirect_count
- 标签使用语法从备忘录纯文本中提取
#tag - 计数会按备忘录去重
- :明确标记了当前标签的备忘录数量
direct_count - :
total_count加上所有后代标签的计数direct_count
Resources
资源
scripts/
scripts/
- : Main converter CLI for local flomo export to grouped Markdown
scripts/flomo_to_nblm.py
- :本地flomo导出为分组Markdown的主转换器CLI
scripts/flomo_to_nblm.py
references/
references/
- : HTML export DOM assumptions and attachment selectors
references/flomo-export-dom.md
- :HTML导出DOM假设和附件选择器说明
references/flomo-export-dom.md