๐Ÿ“ฆ LinkLeong / OZSync

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching โš–๏ธ BSD Zero Clause License
๐Ÿ“ฅ Clone https://github.com/LinkLeong/OZSync.git
HTTPS git clone https://github.com/LinkLeong/OZSync.git
SSH git clone git@github.com:LinkLeong/OZSync.git
CLI gh repo clone LinkLeong/OZSync
a624669980@163.com a624669980@163.com docs: Add sponsor section with Ko-fi support link 83af6d8 4 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .trae
๐Ÿ“ src
๐Ÿ“„ .editorconfig
๐Ÿ“„ .eslintignore
๐Ÿ“„ .eslintrc
๐Ÿ“„ .gitignore
๐Ÿ“„ .npmrc
๐Ÿ“„ DEBUG_GUIDE.md
๐Ÿ“„ debug-status.js
๐Ÿ“„ esbuild.config.mjs
๐Ÿ“„ LICENSE
๐Ÿ“„ main.ts
๐Ÿ“„ manifest.json
๐Ÿ“„ package-lock.json
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ styles.css
๐Ÿ“„ test-api-fix.mjs
๐Ÿ“„ test-auto-sync.mjs
๐Ÿ“„ test-fixes.js
๐Ÿ“„ test-import.mjs
๐Ÿ“„ test-sync.mjs
๐Ÿ“„ tsconfig.json
๐Ÿ“„ version-bump.mjs
๐Ÿ“„ versions.json
๐Ÿ“„ README.md

OZSync for Obsidian

Sync your Obsidian notes with ZimaOS for backup, cloud access, and cross-device synchronization.

This plugin provides seamless integration between Obsidian and ZimaOS, allowing you to:

  • Automatically sync your notes to ZimaOS cloud storage
  • Access your notes from multiple devices
  • Keep your notes backed up and secure
  • Browse and manage your cloud files directly from Obsidian
Key features:
  • Real-time synchronization with ZimaOS
  • Configurable sync intervals (default: 15 minutes)
  • Cloud file browser with upload/download capabilities
  • Automatic conflict resolution
  • Secure authentication with ZimaOS servers
  • Status bar integration with sync status display

Installation

Method 1: Manual Installation (Recommended)

Step 1: Download the source code

git clone https://github.com/LinkLeong/OZSync.git
cd OZSync

Step 2: Install dependencies and build

npm install
npm run build

Step 3: Copy to Obsidian plugins directory

  • Find your vault folder (the folder containing your Obsidian notes)
  • Navigate to YourVaultFolder/.obsidian/plugins/
  • Create a new folder named ozsync
  • Copy the following files from the built project to YourVaultFolder/.obsidian/plugins/ozsync/:
  • main.js
  • manifest.json
  • styles.css
Step 4: Enable the plugin in Obsidian

  • Open Obsidian
  • Go to Settings (โš™๏ธ icon)
  • Navigate to "Community plugins"
  • If "Restricted mode" is enabled, turn it off
  • Click "Refresh" to detect the new plugin
  • Find "OZSync" in the list of installed plugins
  • Toggle the switch to enable it

Method 2: Development Installation

For developers who want to modify the plugin:

Step 1: Clone directly to plugins directory

cd /path/to/your/vault/.obsidian/plugins/
git clone https://github.com/LinkLeong/OZSync.git ozsync
cd ozsync

Step 2: Install dependencies and start development

npm install
npm run dev

Step 3: Enable in Obsidian

  • Follow Step 4 from Method 1
  • The plugin will automatically rebuild when you make changes

Configuration

Initial Setup

  • After enabling the plugin, click the OZSync icon in the left sidebar or use the command palette (Ctrl/Cmd + P) and search for "OZSync"
  • In the settings panel, configure:
  • ZimaOS Server URL: Enter your ZimaOS server address (e.g., http://192.168.1.100:8080)
  • Username: Your ZimaOS username
  • Password: Your ZimaOS password
  • Sync Directory: Choose which folder to sync (default: root vault folder)

Sync Settings

  • Auto Sync: Enable automatic synchronization (enabled by default)
  • Sync Interval: Set how often to sync (default: 15 minutes)
  • Conflict Resolution: Choose how to handle file conflicts:
  • Ask: Prompt for each conflict
  • Local: Always keep local version
  • Remote: Always keep remote version
  • Newer: Keep the newer file based on modification time

Usage

Basic Operations

Manual Sync

  • Click the sync button in the status bar (bottom right)
  • Use Command Palette: "OZSync: Sync Now"
  • Use the ribbon icon in the left sidebar
View Sync Status
  • Check the status bar for current sync status
  • Green: Synced successfully
  • Yellow: Syncing in progress
  • Red: Sync error
Browse Cloud Files
  • Click the OZSync icon in the left sidebar
  • Browse, upload, and download files directly
  • Right-click for context menu options

Advanced Features

Debug Mode

  • Enable in settings to see detailed sync logs
  • Use Command Palette: "OZSync: Debug Status Bar" for troubleshooting
  • Check browser console for detailed debug information
Status Bar Information
  • Shows last sync time
  • Displays sync status
  • Click to open sync panel

Troubleshooting

Common Issues

Plugin not appearing in Obsidian

  • Ensure all files (main.js, manifest.json, styles.css) are in the correct directory
  • Check that "Restricted mode" is disabled in Community plugins settings
  • Try refreshing the plugin list
Sync not working
  • Verify ZimaOS server URL is correct and accessible
  • Check username and password
  • Ensure ZimaOS server is running and reachable
  • Check debug logs for specific error messages
Files not syncing
  • Check if files are in the configured sync directory
  • Verify file permissions
  • Look for conflict resolution prompts

Debug Information

To get debug information:

  • Enable debug mode in plugin settings
  • Open browser developer tools (F12)
  • Check the Console tab for detailed logs
  • Use "OZSync: Debug Status Bar" command for status information

Development

Building from Source

# Clone the repository
git clone https://github.com/LinkLeong/OZSync.git
cd OZSync

# Install dependencies
npm install

# Build for production
npm run build

# Development mode (auto-rebuild)
npm run dev

Project Structure

  • src/main.ts - Main plugin entry point
  • src/ozsync-client.ts - ZimaOS API client
  • src/settings.ts - Plugin settings interface
  • src/file-browser.ts - Cloud file browser component
  • manifest.json - Plugin metadata
  • styles.css - Plugin styles

Support

If you encounter any issues or have questions:

  • Check the troubleshooting section above
  • Enable debug mode and check console logs
  • Create an issue on GitHub
  • Include debug logs and system information when reporting issues

Sponsor

If you find OZSync helpful, please consider supporting the development:

ko-fi

Your support helps maintain and improve this plugin. Thank you!

License

This project is licensed under the MIT License - see the LICENSE file for details.