springrain | 公众号: 及时春雨99 downloadsMake Flomo Memos to Obsidian Notes
Version 2.4.4 - Enhanced fork from jia6y/flomo-to-obsidian with major improvements
Author: springrain | 公众号: 及时春雨
GitHub: https://github.com/springrain1
#Work #Important)flomo picture/file/2025-11-03/4852/filename.m4a ❌flomo attachment/2025-11-03/filename.m4a ✅Auto Sync On Startup & Hourly Auto Sync & Adhoc SyncFlomo Canvas (with content | file link)Flomo MomentsThis plugin offers several ways to import and manage your Flomo notes within Obsidian:
flomo_backup.zip) from the Flomo website yourself, then select the zip file in the plugin UI to import.Flomo Target) and a subfolder for individual memos (Memo Target).<mark> tags to Obsidian's ==highlight== syntax.Flomo Moments.md file that embeds links to all imported memo files, providing a chronological overview.[[wiki-links]] within your memo content during import.---.The project is organized as follows:
esbuild.config.mjs # Build configuration for esbuild (compiles TS to JS)
main.ts # Plugin entry point: loads settings, adds commands/icons, initializes UI and auto-sync
manifest.json # Plugin metadata (name, version, author, etc.)
package.json # Project dependencies and npm scripts (build, dev, version)
styles.css # Custom CSS styles for the plugin UI
versions.json # Version history (used by BRAT)
lib/ # Core logic directory
flomo/ # Flomo-specific functionalities
auth.ts # Handles authentication logic (likely using Playwright)
const.ts # Defines constants (like cache paths, filenames)
core.ts # Core data processing: parses HTML, identifies memos, generates IDs for incremental sync
exporter.ts # Handles exporting data from Flomo (using Playwright)
importer.ts # Handles importing data into Obsidian: reads files, uses FlomoCore, writes notes
obIntegration/ # Obsidian-specific integrations
canvas.ts # Logic for generating the Flomo Canvas file
moments.ts # Logic for generating the Flomo Moments file
ui/ # User Interface components
auth_ui.ts # UI modal for Flomo authentication
common.ts # Shared UI helper functions or components
main_ui.ts # Main plugin settings and action UI modal
manualsync_ui.ts# UI section/modal for manual zip file import
message_ui.ts # UI components for displaying messages/notices
node_modules/ # Installed npm dependencies
Understanding how synchronization works, especially incrementally:
main.ts) or manually (clicking "Sync Now" in main_ui.ts or using the "Sync Flomo Now" command).FlomoExporter utilizes Playwright (a browser automation tool) to:const.ts, e.g., DOWNLOAD_FILE).FlomoImporter class is instantiated.importFlomoFile method is called, passing the path to the downloaded HTML file (DOWNLOAD_FILE).FlomoImporter reads the HTML file content.FlomoCore's constructor, passing the HTML data and the list of already synced memo IDs (syncedMemoIds) loaded from the plugin's saved settings (this.settings.syncedMemoIds).FlomoCore):loadMemos method iterates through each memo element (<div class="memo">).memoId is generated. This ID is based on a combination of:memoId is compared against the syncedMemoIds list received from the settings.memoId is added to the instance's syncedMemoIds list, newMemosCount is incremented, and the memo's data is added to the memos array to be processed.FlomoImporter.importFlomoFile):FlomoCore, including the list of only the newly identified memos.Flomo Target and Memo Target folders in your vault.generateMoments and generateCanvas if enabled.main.ts):importFlomoFile completes, the plugin calls saveSettings().syncedMemoIds list (which now includes the IDs of the newly imported memos) and the current lastSyncTime back into Obsidian's persistent storage for this plugin. This ensures the next sync knows about these newly added memos.This detailed ID generation and checking process is the key to reliable incremental synchronization, ensuring only new content is added to your Obsidian vault.
npm installnpx [email protected] install如果需要修改导入的笔记格式或模板:
lib/flomo/importer.ts - 负责将Flomo笔记转换为Obsidian格式lib/obIntegration/moments.ts - 修改Moments功能的显示方式lib/obIntegration/canvas.ts - 修改Canvas展示格式lib/ui/ 目录下styles.css 文件中进行npm run devnpm run buildmain.jsnpm run versionmanifest.json 和 versions.json 中定义npx [email protected] installInstall Flomo Importer and enable it.
Use the command Open Flomo Importer, or use Import Button
Click on "Auto Sync"
Authentication is required if the first time syncs or the current sign-in expires.
Exporting & Importing
Go to Account Details
Select Export All (as HTML)
Click on Start to export
Choose flomo.zip to Import. The Flomo & Memo Home is where to store your memos.
A Notice pops up when the import is completed.
Checkout Flmomo Moments and Flomo Canvas 🌅
If you're upgrading from an older version, the attachment path structure has changed. You have two options:
[Flomo Home]/memos/ (e.g., flomo/memos/ or 10 flomo/memos/)[Flomo Home]/flomo picture/ (if exists)Note: Content update detection works automatically. If you edit a memo in Flomo after upgrading, it will be detected and re-imported.
You can customize the following options in the plugin settings page:
flomo).memos).