No description
Find a file
2025-01-18 12:24:44 +08:00
.github/workflows release.yml add styles.css 2025-01-18 12:24:44 +08:00
assets update 2024-12-15 13:09:00 +08:00
src move all styles into CSS 2025-01-18 12:23:06 +08:00
.editorconfig export_readme 2024-04-22 21:27:53 +08:00
.eslintignore export_readme 2024-04-22 21:27:53 +08:00
.eslintrc export_readme 2024-04-22 21:27:53 +08:00
.gitignore ignore data.json/main.js 2024-05-07 11:45:34 +08:00
.npmrc export_readme 2024-04-22 21:27:53 +08:00
data.json select config folder 2024-12-16 12:51:58 +08:00
esbuild.config.mjs export_readme 2024-04-22 21:27:53 +08:00
LICENSE add license 2024-12-15 13:45:12 +08:00
main.ts fix 2024-12-29 12:54:54 +08:00
manifest.json update 2024-12-15 12:06:58 +08:00
package.json export_readme 2024-04-22 21:27:53 +08:00
README.md update 2024-12-15 13:35:25 +08:00
readMe_中文.md update 2024-12-15 13:35:25 +08:00
styles.css move all styles into CSS 2025-01-18 12:23:06 +08:00
tsconfig.json export_readme 2024-04-22 21:27:53 +08:00
version-bump.mjs export_readme 2024-04-22 21:27:53 +08:00
versions.json export_readme 2024-04-22 21:27:53 +08:00

Eng | 中文版

This plugin depends on: Templater and NoteChain

Exporting Notes

Sync files or folders:

  1. Right-click on the file or folder in the file list;
  2. Click Sync to other vault;
  3. Enter the target vault root directory;
  4. Notes, folders, and attachments embedded in notes will be copied to the target vault following the same file structure. If a file with the same name exists in the target vault, it will be determined whether to overwrite based on the last modified time;

Exporting plugins:

  1. Note Sync: export plugin
  2. Select the plugin to export;
  3. Choose whether to export data.json;
  4. Enter the plugin save directory;
  5. Press Enter to confirm.

Exporting Notes as readMe

Execute Note Sync:Set config to export note to set export information:

  • Dir: Export path
  • Name: File name, default is readMe
  • Assets: Attachment storage path
  • RemoveMeta: Whether to remove metadata, default is true
  • UseGitLink: Use Git format for attachment links, default is true

[!NOTE]+ Example of file export configuration

note-sync:
  Dir: D:\github\ObsidianZ-dev\.obsidian\plugins\note-sync
  Name: readMe_en
  Assets: ./assets
  RemoveMeta: true
  UseGitLink: true

Then execute Note Sync:Export current note to set the export note.

Settings Page

Pasted image 20241215125538.png

[!NOTE]+ Root dir of vault When exporting plugins, right-click to sync files and select the preset vault. Use line breaks to separate multiple vaults.

[!Danger]+ Strict mode When right-clicking to sync a folder, delete notes or attachments that are in the target folder but not in the source folder. This ensures that the synced folder and the current folder are the same. This setting will delete files, please operate with caution.

Functions

NoteSync provides three functions for synchronizing files and folders, which can be used in your own script notes.

mode specifies the handling method when a file already exists in the target vault:

  • pass: Skip;
  • overwrite: Overwrite;
  • mtime: Take the latest modified time;
let ns = app.plugins.plugins['note-sync']

// 同步系统文件夹
ns.fsEditor.sync_folder(
	src:string,
	dst:string,
	mode='mtime',
	strict=false
)

// 同步笔记文件夹
ns.fsEditor.sync_tfolder(
	tfolder:TFolder,
	vault_root:string,
	mode='mtime',
	attachment=true,
	outlink=false,
	strict=false
)