### Run FLOWnote development commands Source: https://github.com/1095327780/flownote/blob/main/README.zh-CN.md Run the full development pipeline for FLOWnote: install dependencies and run checks (ci), build the release artifacts (build:release), and verify the submission (check:submission). The release artifacts are output to the release/ directory. ```bash npm run ci npm run build:release npm run check:submission ``` -------------------------------- ### Compute chapter ranges and statistics with --chapter-lines Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/references/wechat-export-outline-workflow.md Computes per-chapter statistics (line ranges, highlight counts, idea counts, idea block counts) based on chapter start line numbers. When the number of chapters is 5 or fewer, it also outputs candidate sub-chapter headings for the next level. ```bash python3 ".opencode/skills/ah-read/assets/extract_weread_outline.py" ranges "<文档路径>" --chapter-lines "75,1131,1671,2191" --expand-if-lte 5 ``` -------------------------------- ### Recent activity list Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-init/references/HOME模板.md Shows the 12 most recently modified markdown pages, excluding hidden paths (starting with '.', memory folders, Clippings, and archive) and the current page. Displays each as a link with its modification timestamp. ```dataviewjs const hiddenPrefixes = [".", "{{metaPaths.memory}}", "{{metaPaths.legacyMemory}}", "Clippings/", "{{notePaths.archive}}/"]; const pages = dv.pages() .where(p => p.file.ext === "md") .where(p => !hiddenPrefixes.some(prefix => p.file.path.startsWith(prefix))) .where(p => p.file.path !== dv.current().file.path) .sort(p => p.file.mtime, "desc") .slice(0, 12); dv.list(pages.map(p => `${p.file.link} · ${p.file.mtime.toFormat("MM-dd HH:mm")}`)); ``` -------------------------------- ### 安装 OpenCode CLI 命令 Source: https://github.com/1095327780/flownote/blob/main/README.zh-CN.md 在桌面端选择 OpenCode 桥接模式时,需要先安装 Node.js,然后执行此命令全局安装 opencode-ai。 ```bash npm install -g opencode-ai ``` -------------------------------- ### Dataview 查询项目文件目录 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-project/assets/项目模板.md 列出当前项目文件夹下的所有文件及其类型、目录和最后更新时间,按路径升序排列。用于项目文件目录概览。 ```dataview TABLE WITHOUT ID file.link as "文件", file.ext as "类型", file.folder as "目录", file.mtime as "最后更新" FROM "" WHERE startswith(file.folder, this.file.folder) AND file.path != this.file.path SORT file.path ASC ``` -------------------------------- ### Today's entry with tasks and captures Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-init/references/HOME模板.md Displays a header with the current date and week number, a link to today's daily note, and counts of open tasks, completed tasks, and list items captured today. Shows up to 8 open tasks as a task list, or a fallback message when there are none. ```dataviewjs const cfg = { daily: "{{notePaths.dailyNotes}}", highlights: "{{notePaths.highlights}}", permanent: "{{notePaths.permanentNotes}}", literature: "{{notePaths.literatureNotes}}", topics: "{{notePaths.topicNotes}}", domains: "{{notePaths.domainPages}}", projects: "{{notePaths.activeProjects}}", archives: "{{notePaths.archive}}", memory: "{{metaPaths.memory}}" }; const today = dv.date("today"); const todayPath = `${cfg.daily}/${today.toFormat("yyyy-MM-dd")}`; const todayPage = dv.page(todayPath); const tasks = todayPage?.file?.tasks ?? []; const openTasks = tasks.filter(t => !t.completed); const doneTasks = tasks.filter(t => t.completed); const capturesToday = todayPage ? todayPage.file.lists.length : 0; dv.header(3, `${today.toFormat("yyyy-MM-dd")} · 第 ${today.weekNumber} 周`); dv.paragraph(`[[${todayPath}|打开今日日记]] · 待办 ${openTasks.length} · 已完成 ${doneTasks.length} · 今日记录 ${capturesToday}`); if (openTasks.length) { dv.taskList(openTasks.slice(0, 8), false); } else { dv.paragraph("今天还没有未完成待办。"); } ``` -------------------------------- ### 检查进度文件 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/SKILL.md 检查进度文件是否存在,路径为 {{metaPaths.memory}}/reading/。 ```text 首先检查:{{metaPaths.memory}}/reading/ 是否存在该书的进度文件? ``` -------------------------------- ### Directory table with note counts Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-init/references/HOME模板.md Builds a table of folders with their layer, name, note count, and path. Counts only markdown files in each folder using dv.pages(). ```dataviewjs const folders = [ ["捕获", "每日笔记", "{{notePaths.dailyNotes}}"], ["捕获", "划线笔记", "{{notePaths.highlights}}"], ["捕获", "周记", "{{notePaths.weeklyReviews}}"], ["捕获", "月记", "{{notePaths.monthlyReviews}}"], ["培养", "永久笔记", "{{notePaths.permanentNotes}}"], ["培养", "文献笔记", "{{notePaths.literatureNotes}}"], ["培养", "主题笔记", "{{notePaths.topicNotes}}"], ["连接", "领域页", "{{notePaths.domainPages}}"], ["创造", "项目", "{{notePaths.activeProjects}}"], ["创造", "归档", "{{notePaths.archive}}"] ]; function pageCount(folder) { return dv.pages(`"${folder}"`).where(p => p.file.ext === "md").length; } dv.table( ["层级", "目录", "笔记数", "路径"], folders.map(([layer, name, folder]) => [ layer, name, pageCount(folder), `\`${folder}\`` ]) ); ``` -------------------------------- ### Dataview 查询最近更新文件 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-project/assets/项目模板.md 显示项目文件夹内最近更新的10个文件,按修改时间降序排列。用于快速查看项目最新动态。 ```dataview TABLE WITHOUT ID file.link as "文件", file.mtime as "最后更新", file.ctime as "创建时间" FROM "" WHERE startswith(file.folder, this.file.folder) AND file.path != this.file.path SORT file.mtime DESC LIMIT 10 ``` -------------------------------- ### Active projects table Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-init/references/HOME模板.md Lists active projects by finding overview pages (named '📍 项目总览' or 'Project Overview') under the project root, excluding the root overview and archived folders. Sorts by modification time descending and shows a table with project link, status, priority, and last update date. ```dataviewjs const projectRoot = "{{notePaths.activeProjects}}"; const overviewNames = new Set(["📍 项目总览", "Project Overview"]); function projectFolderName(page) { const rel = page.file.path .replace(`${projectRoot}/`, "") .replace(/\/(📍 项目总览|Project Overview)\.md$/, ""); return rel.split("/").filter(Boolean).join(" / "); } const projects = dv.pages(`"${projectRoot}"`) .where(p => p.file.ext === "md") .where(p => overviewNames.has(p.file.name)) .where(p => p.file.path !== `${projectRoot}/📍 项目总览.md`) .where(p => p.file.path !== `${projectRoot}/Project Overview.md`) .where(p => !p.file.path.includes("/归档/")) .where(p => !p.file.path.includes("/Archives/")) .sort(p => p.file.mtime, "desc"); if (!projects.length) { dv.paragraph("暂无进行中的项目。"); } else { dv.table( ["项目", "状态", "优先级", "更新"], projects.map(p => [ dv.fileLink(p.file.path, false, projectFolderName(p)), p.status ?? p.状态 ?? "进行中", p.priority ?? p.优先级 ?? "—", p.file.mtime.toFormat("MM-dd") ]) ); } ``` -------------------------------- ### Archive project with mv command Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-archive/references/path-rules.md Moves an active project directory into the archive under a confirmed hierarchy level. The command uses the notePaths placeholders for source and destination paths and preserves the project's numbering and name in the target directory name. ```bash mv "{{notePaths.activeProjects}}/{{编号}} {{项目名}}" "{{notePaths.archive}}/{{已确认层级}}/{{编号}} {{项目名}}" ``` -------------------------------- ### 记录提醒状态到 STATUS.md Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 在记忆系统的 STATUS.md 文件中记录用户对回顾提醒的选择,以便第二天判断是否自动添加。 ```markdown # 在 {{metaPaths.memory}}/STATUS.md 中记录 ## 🔄 回顾 - 周回顾提醒:{{YYYY-MM-DD}} 用户选择「明天再说」 - 月回顾提醒:{{YYYY-MM-DD}} 用户选择「加入任务」 ``` -------------------------------- ### 手动安装文件路径 Source: https://github.com/1095327780/flownote/blob/main/README.zh-CN.md 手动安装 FLOWnote 插件时,需要将 main.js、manifest.json 和 styles.css 放入指定目录。 ```text /.obsidian/plugins/flownote/ ``` -------------------------------- ### 获取月度数据:bash 命令集合 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-month/references/数据汇总模板.md 在月度回顾时执行,用于获取当前日期、统计本月笔记(永久、日记、周记)、获取文献/主题/领域笔记、读取缓冲区状态和活跃项目列表。所有路径使用模板变量,需替换为实际路径。 ```bash current_year=$(date +%Y) current_month=$(date +%m) # 统计本月永久笔记 ls "{{notePaths.permanentNotes}}/ # 统计本月日记 ls "{{notePaths.dailyNotes}}/" | grep "${current_year}-${current_month}" # 统计本月周记 ls "{{notePaths.weeklyReviews}}/" # 获取文献笔记 ls "{{notePaths.literatureNotes}}/" # 获取主题笔记 ls "{{notePaths.topicNotes}}/" # 获取领域页 ls "{{notePaths.domainPages}}/" # 读取缓冲区状态 cat "{{metaPaths.memory}}/STATUS.md" # 获取活跃项目 ls "{{notePaths.activeProjects}}/" 2>/dev/null ``` -------------------------------- ### 开场收集上下文 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/SKILL.md 开场白,收集书名、作者、阅读动机和整理模式选择。 ```text 收到你的阅读划线!📚 在开始之前,请告诉我: 1. **这本书叫什么?作者是谁?** 2. **你为什么读这本书?**(想解决什么问题) 3. **整理笔记时,你希望我:** - A. 深度思考模式 — 帮你逐条分析,引导你深度思考(推荐) - B. 快速整理模式 — 只在关键处提问,快速归类 - C. 直接整理模式 — 不需要引导,直接归类整理 ``` -------------------------------- ### 发现进度文件提示 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/SKILL.md 当存在进度文件时显示,询问用户是否继续上次进度或重新开始。 ```text 📋 发现未完成的整理进度! 书籍:《{{书名}}》 上次进度:已完成 {{N}}/{{M}} 章节 上次停留:{{章节名}} 要继续整理吗? - A. 继续上次进度 - B. 重新开始(会覆盖之前的进度) ``` -------------------------------- ### Knowledge map counts table Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-init/references/HOME模板.md Displays a single-row table with counts of notes in each configured folder (daily, highlights, permanent, literature, topics, domains) and the number of active projects (overview pages excluding root and archived). ```dataviewjs const cfg = { daily: "{{notePaths.dailyNotes}}", highlights: "{{notePaths.highlights}}", permanent: "{{notePaths.permanentNotes}}", literature: "{{notePaths.literatureNotes}}", topics: "{{notePaths.topicNotes}}", domains: "{{notePaths.domainPages}}", projects: "{{notePaths.activeProjects}}" }; const overviewNames = new Set(["📍 项目总览", "Project Overview"]); const count = (folder) => dv.pages(`"${folder}"`).where(p => p.file.ext === "md").length; const projects = dv.pages(`"${cfg.projects}"`) .where(p => p.file.ext === "md" && overviewNames.has(p.file.name)) .where(p => p.file.path !== `${cfg.projects}/📍 项目总览.md`) .where(p => p.file.path !== `${cfg.projects}/Project Overview.md`) .where(p => !p.file.path.includes("/归档/")) .length; dv.table( ["每日笔记", "划线笔记", "永久笔记", "文献笔记", "主题", "领域", "项目"], [[ count(cfg.daily), count(cfg.highlights), count(cfg.permanent), count(cfg.literature), count(cfg.topics), count(cfg.domains), projects ]] ); ``` -------------------------------- ### 获取日期信息(Python 脚本) Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 获取当前日期、星期、当月最后一天和倒数第二天,用于判断周/月/年回顾提醒的触发条件。跨平台(macOS/Linux),自动处理闰年2月和大小月差异。 ```bash python3 - <<'PY' from datetime import date, timedelta today = date.today() first_next_month = date(today.year + (today.month // 12), (today.month % 12) + 1, 1) last_day = (first_next_month - timedelta(days=1)).day second_last_day = last_day - 1 print(f"today={today.isoformat()}") print(f"day_of_week={today.isoweekday()}") # 1=周一 ... 6=周六 7=周日 print(f"today_day={today.day}") print(f"today_month={today.month}") print(f"last_day={last_day}") print(f"second_last_day={second_last_day}") PY ``` -------------------------------- ### 工作流程总览 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/SKILL.md 工作流程总览,展示从检查进度到输出下一步建议的完整步骤。 ```text 0. 检查进度(是否有未完成的整理) ↓ 有 → 读取进度,询问是否继续 ↓ 无 → 进入新整理流程 1. 收集阅读上下文(书名、动机、模式选择) ↓ 2. 运行脚本提取章节索引,生成分批计划 ↓ 3. 逐章处理:展示划线 → 【核心】评估思考深度 → 引导补充 → 提炼洞见 ↓ 4. 生成/更新文献笔记(用户思考的结构化整理) ↓ 5. 按转化策略执行分支(逐章转卡 / 全书后转卡) ↓ 6. 回写状态,输出下一步建议 ``` -------------------------------- ### 生成分批计划 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/SKILL.md 生成分批计划表格,展示各章节的划线数和想法数,并询问从哪一章开始。 ```text 我把 {{N}} 条划线按章节分成了 {{M}} 个批次: 📋 整理计划 | 序号 | 章节 | 划线数 | 想法数 | 状态 | |------|------|--------|--------|------| | 1 | {{章节1}} | {{n}}条 | {{m}}条 | ⬜ 待处理 | | 2 | {{章节2}} | {{n}}条 | {{m}}条 | ⬜ 待处理 | | ... | ... | ... | ... | ... | 你可以随时说"今天先到这",我会保存进度。 从哪一章开始? ``` -------------------------------- ### 多重回顾叠加提醒消息 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 当多种回顾同时触发时(如月末恰逢周末)的叠加提醒消息,按优先级展示并建议优先做年回顾。 ```text 💡 今天有多个回顾需要关注: 1. 📅 **年回顾**(今年最后一天) 2. 📆 **月回顾**(本月最后一天) 3. 📋 **周回顾**(本周最后一天) 建议优先做年回顾(年回顾会包含月度和周度的内容)。 若先做周回顾,也请同步给出“本月计划进展一句话判断”。 要把哪些加入今日任务? ``` -------------------------------- ### 周回顾周日自动添加消息 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 周日(第二次提醒)自动添加周回顾到任务列表的消息,当周六选择「明天再说」或未创建日记时触发。 ```text 📌 已自动添加「周回顾」到今日任务。 📌 同步提醒:请检查本月计划的当前进展(是否偏离月目标)。 完成日记创建后,可以用 `/ah-week` 开始周回顾。 ``` -------------------------------- ### 月回顾最后1天自动添加消息 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 最后1天(第二次提醒)自动添加月回顾到任务列表的消息,当前一天选择「明天再说」或未创建日记时触发。 ```text 📌 已自动添加「月回顾」到今日任务。今天是本月最后一天。 完成日记创建后,可以用 `/ah-month` 开始月回顾。 ``` -------------------------------- ### 周回顾周六提醒消息 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 周六(第一次提醒)的周回顾提醒消息,提供三个选项:加入任务、跳过、明天再说。 ```text 💡 今天是周六,这周快结束了。 要不要把「周回顾」加入今天的任务列表? 周回顾会帮你总结本周、规划下周。 另外,本月计划当前进展也建议一起检查,避免月底集中补课。 1. ✅ 加入今日任务 2. ⏭️ 这周不做(周日也不提醒) 3. 🔜 明天再说 ``` -------------------------------- ### Compute chapter ranges with extract_weread_outline.py Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/SKILL.md Computes line ranges for chapters based on the provided chapter-lines argument. The script path is fixed as assets/extract_weread_outline.py. Replace <文档路径> with the actual document path and adjust the chapter-lines values as needed. ```bash python3 ".opencode/skills/ah-read/assets/extract_weread_outline.py" ranges "<文档路径>" --chapter-lines "75,1131,1671,2191" ``` -------------------------------- ### 确认转化策略 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/SKILL.md 确认转化策略,用户必须明确选择 A 或 B。 ```text 还需要确认一下转化策略: 整理完成后,你想怎么处理洞见→卡片笔记? - A. 逐章转卡 — 每章完成后可立即制作卡片笔记 - B. 全书后转卡 — 先完成整本书整理,最后批量转卡 ``` -------------------------------- ### 年回顾12月31日自动添加消息 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 12月31日(第二次提醒)自动添加年回顾到任务列表的消息,当前一天选择「明天再说」或未创建日记时触发。 ```text 📌 已自动添加「年回顾」到今日任务。今天是今年最后一天。 完成日记创建后,可以用 `/ah-year` 开始年回顾。 ``` -------------------------------- ### 月回顾倒数第2天提醒消息 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 倒数第2天(第一次提醒)的月回顾提醒消息,提供三个选项:加入任务、跳过、明天再说。 ```text 💡 这个月快结束了(还剩2天)。 要不要把「月回顾」加入今天的任务列表? 月回顾会帮你总结本月、规划下月。 1. ✅ 加入今日任务 2. ⏭️ 这个月不做 3. 🔜 明天再说 ``` -------------------------------- ### 年回顾12月30日提醒消息 Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-note/references/回顾提醒规则.md 12月30日(第一次提醒)的年回顾提醒消息,提供三个选项:加入任务、跳过、明天再说。 ```text 💡 这一年快结束了! 要不要把「年回顾」加入今天的任务列表? 年回顾会帮你总结全年、规划新的一年。 1. ✅ 加入今日任务 2. ⏭️ 今年不做 3. 🔜 明天再说 ``` -------------------------------- ### Extract third-level headings with line numbers Source: https://github.com/1095327780/flownote/blob/main/bundled-skills/ah-read/references/wechat-export-outline-workflow.md Extracts all third-level headings with their line numbers from a WeRead document. The output includes the sequence number, line number, and heading text for each heading. ```bash python3 ".opencode/skills/ah-read/assets/extract_weread_outline.py" headings "<文档路径>" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.