updated config for unidirectional sync
This commit is contained in:
parent
9a21263738
commit
e8047fbba2
2 changed files with 153 additions and 140 deletions
|
|
@ -1,54 +1,88 @@
|
||||||
# Default CalDAV Sync Configuration
|
# Default CalDAV Sync Configuration
|
||||||
# This file provides default values for the Zoho to Nextcloud calendar sync
|
# This file provides default values for CalDAV synchronization
|
||||||
|
|
||||||
# Zoho Configuration (Source)
|
|
||||||
[zoho]
|
|
||||||
server_url = "https://caldav.zoho.com/caldav"
|
|
||||||
username = ""
|
|
||||||
password = ""
|
|
||||||
selected_calendars = []
|
|
||||||
|
|
||||||
# Nextcloud Configuration (Target)
|
|
||||||
[nextcloud]
|
|
||||||
server_url = ""
|
|
||||||
username = ""
|
|
||||||
password = ""
|
|
||||||
target_calendar = "Imported-Zoho-Events"
|
|
||||||
create_if_missing = true
|
|
||||||
|
|
||||||
|
# Source Server Configuration (Primary CalDAV server)
|
||||||
[server]
|
[server]
|
||||||
|
# CalDAV server URL (example: Zoho, Google Calendar, etc.)
|
||||||
|
url = "https://caldav.example.com/"
|
||||||
|
# Username for authentication
|
||||||
|
username = ""
|
||||||
|
# Password for authentication (use app-specific password)
|
||||||
|
password = ""
|
||||||
|
# Whether to use HTTPS (recommended)
|
||||||
|
use_https = true
|
||||||
# Request timeout in seconds
|
# Request timeout in seconds
|
||||||
timeout = 30
|
timeout = 30
|
||||||
|
|
||||||
|
# Source Calendar Configuration
|
||||||
[calendar]
|
[calendar]
|
||||||
# Calendar color in hex format
|
# Calendar name/path on the server
|
||||||
|
name = "calendar"
|
||||||
|
# Calendar display name (optional - will be discovered from server if not specified)
|
||||||
|
display_name = ""
|
||||||
|
# Calendar color in hex format (optional - will be discovered from server if not specified)
|
||||||
color = "#3174ad"
|
color = "#3174ad"
|
||||||
# Default timezone for processing
|
# Calendar timezone (optional - will be discovered from server if not specified)
|
||||||
timezone = "UTC"
|
timezone = ""
|
||||||
|
# Whether this calendar is enabled for synchronization
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
# Synchronization Configuration
|
||||||
[sync]
|
[sync]
|
||||||
# Synchronization interval in seconds (300 = 5 minutes)
|
# Synchronization interval in seconds (300 = 5 minutes)
|
||||||
interval = 300
|
interval = 300
|
||||||
# Whether to perform synchronization on startup
|
# Whether to perform synchronization on startup
|
||||||
sync_on_startup = true
|
sync_on_startup = true
|
||||||
# Number of weeks ahead to sync
|
# Maximum number of retry attempts for failed operations
|
||||||
weeks_ahead = 1
|
|
||||||
# Whether to run in dry-run mode (preview changes only)
|
|
||||||
dry_run = false
|
|
||||||
|
|
||||||
# Performance settings
|
|
||||||
max_retries = 3
|
max_retries = 3
|
||||||
|
# Delay between retry attempts in seconds
|
||||||
retry_delay = 5
|
retry_delay = 5
|
||||||
|
# Whether to delete local events that are missing on server
|
||||||
|
delete_missing = false
|
||||||
|
# Date range configuration
|
||||||
|
[sync.date_range]
|
||||||
|
# Number of days ahead to sync
|
||||||
|
days_ahead = 7
|
||||||
|
# Number of days in the past to sync
|
||||||
|
days_back = 0
|
||||||
|
# Whether to sync all events regardless of date
|
||||||
|
sync_all_events = false
|
||||||
|
|
||||||
# Optional filtering configuration
|
# Optional filtering configuration
|
||||||
# [filters]
|
# [filters]
|
||||||
# # Event types to include (leave empty for all)
|
# # Start date filter (ISO 8601 format)
|
||||||
|
# start_date = "2024-01-01T00:00:00Z"
|
||||||
|
# # End date filter (ISO 8601 format)
|
||||||
|
# end_date = "2024-12-31T23:59:59Z"
|
||||||
|
# # Event types to include
|
||||||
# event_types = ["meeting", "appointment"]
|
# event_types = ["meeting", "appointment"]
|
||||||
# # Keywords to filter events by
|
# # Keywords to filter events by (events containing any of these will be included)
|
||||||
# keywords = ["work", "meeting", "project"]
|
# keywords = ["work", "meeting", "project"]
|
||||||
# # Keywords to exclude
|
# # Keywords to exclude (events containing any of these will be excluded)
|
||||||
# exclude_keywords = ["personal", "holiday", "cancelled"]
|
# exclude_keywords = ["personal", "holiday", "cancelled"]
|
||||||
# # Minimum event duration in minutes
|
|
||||||
# min_duration_minutes = 5
|
# Optional Import Configuration (for unidirectional sync to target server)
|
||||||
# # Maximum event duration in hours
|
# Uncomment and configure this section to enable import functionality
|
||||||
# max_duration_hours = 24
|
# [import]
|
||||||
|
# # Target server configuration
|
||||||
|
# [import.target_server]
|
||||||
|
# url = "https://nextcloud.example.com/remote.php/dav/"
|
||||||
|
# username = ""
|
||||||
|
# password = ""
|
||||||
|
# use_https = true
|
||||||
|
# timeout = 30
|
||||||
|
#
|
||||||
|
# # Target calendar configuration
|
||||||
|
# [import.target_calendar]
|
||||||
|
# name = "Imported-Events"
|
||||||
|
# display_name = "Imported from Source"
|
||||||
|
# color = "#FF6B6B"
|
||||||
|
# timezone = "UTC"
|
||||||
|
# enabled = true
|
||||||
|
#
|
||||||
|
# # Import behavior settings
|
||||||
|
# overwrite_existing = true # Source always wins
|
||||||
|
# delete_missing = false # Don't delete events missing from source
|
||||||
|
# dry_run = false # Set to true for preview mode
|
||||||
|
# batch_size = 50 # Number of events to process in each batch
|
||||||
|
# create_target_calendar = true # Create target calendar if it doesn't exist
|
||||||
|
|
|
||||||
|
|
@ -1,117 +1,96 @@
|
||||||
# CalDAV Configuration Example
|
# CalDAV Configuration Example
|
||||||
# This file demonstrates how to configure Zoho and Nextcloud CalDAV connections
|
# This file demonstrates how to configure CalDAV synchronization
|
||||||
# Copy and modify this example for your specific setup
|
# Copy and modify this example for your specific setup
|
||||||
|
|
||||||
# Global settings
|
# Source Server Configuration (e.g., Zoho Calendar)
|
||||||
global:
|
[server]
|
||||||
log_level: "info"
|
# CalDAV server URL
|
||||||
sync_interval: 300 # seconds (5 minutes)
|
url = "https://calendar.zoho.com/caldav/d82063f6ef084c8887a8694e661689fc/events/"
|
||||||
conflict_resolution: "latest" # or "manual" or "local" or "remote"
|
# Username for authentication
|
||||||
timezone: "UTC"
|
username = "your-email@domain.com"
|
||||||
|
# Password for authentication (use app-specific password)
|
||||||
|
password = "your-app-password"
|
||||||
|
# Whether to use HTTPS (recommended)
|
||||||
|
use_https = true
|
||||||
|
# Request timeout in seconds
|
||||||
|
timeout = 30
|
||||||
|
|
||||||
# Zoho CalDAV Configuration (Source)
|
# Source Calendar Configuration
|
||||||
zoho:
|
[calendar]
|
||||||
enabled: true
|
# Calendar name/path on the server
|
||||||
|
name = "caldav/d82063f6ef084c8887a8694e661689fc/events/"
|
||||||
# Server settings
|
# Calendar display name
|
||||||
server:
|
display_name = "Work Calendar"
|
||||||
url: "https://caldav.zoho.com/caldav"
|
# Calendar color in hex format
|
||||||
timeout: 30 # seconds
|
color = "#4285F4"
|
||||||
|
# Default timezone for the calendar
|
||||||
# Authentication
|
timezone = "UTC"
|
||||||
auth:
|
# Whether this calendar is enabled for synchronization
|
||||||
username: "your-zoho-email@domain.com"
|
enabled = true
|
||||||
password: "your-zoho-app-password" # Use app-specific password, not main password
|
|
||||||
|
|
||||||
# Calendar selection - which calendars to import from
|
|
||||||
calendars:
|
|
||||||
- name: "Work Calendar"
|
|
||||||
enabled: true
|
|
||||||
color: "#4285F4"
|
|
||||||
sync_direction: "pull" # Only pull from Zoho
|
|
||||||
|
|
||||||
- name: "Personal Calendar"
|
|
||||||
enabled: true
|
|
||||||
color: "#34A853"
|
|
||||||
sync_direction: "pull"
|
|
||||||
|
|
||||||
- name: "Team Meetings"
|
|
||||||
enabled: false # Disabled by default
|
|
||||||
color: "#EA4335"
|
|
||||||
sync_direction: "pull"
|
|
||||||
|
|
||||||
# Sync options
|
|
||||||
sync:
|
|
||||||
sync_past_events: false # Don't sync past events
|
|
||||||
sync_future_events: true
|
|
||||||
sync_future_days: 7 # Only sync next week
|
|
||||||
include_attendees: false # Keep it simple
|
|
||||||
include_attachments: false
|
|
||||||
|
|
||||||
# Nextcloud CalDAV Configuration (Target)
|
# Synchronization Configuration
|
||||||
nextcloud:
|
[sync]
|
||||||
enabled: true
|
# Synchronization interval in seconds (300 = 5 minutes)
|
||||||
|
interval = 300
|
||||||
# Server settings
|
# Whether to perform synchronization on startup
|
||||||
server:
|
sync_on_startup = true
|
||||||
url: "https://your-nextcloud-domain.com"
|
# Maximum number of retry attempts for failed operations
|
||||||
timeout: 30 # seconds
|
max_retries = 3
|
||||||
|
# Delay between retry attempts in seconds
|
||||||
# Authentication
|
retry_delay = 5
|
||||||
auth:
|
# Whether to delete local events that are missing on server
|
||||||
username: "your-nextcloud-username"
|
delete_missing = false
|
||||||
password: "your-nextcloud-app-password" # Use app-specific password
|
# Date range configuration
|
||||||
|
[sync.date_range]
|
||||||
# Calendar discovery
|
# Number of days ahead to sync
|
||||||
discovery:
|
days_ahead = 30
|
||||||
principal_url: "/remote.php/dav/principals/users/{username}/"
|
# Number of days in the past to sync
|
||||||
calendar_home_set: "/remote.php/dav/calendars/{username}/"
|
days_back = 30
|
||||||
|
# Whether to sync all events regardless of date
|
||||||
# Target calendar - all Zoho events go here
|
sync_all_events = false
|
||||||
calendars:
|
|
||||||
- name: "Imported-Zoho-Events"
|
|
||||||
enabled: true
|
|
||||||
color: "#FF6B6B"
|
|
||||||
sync_direction: "push" # Only push to Nextcloud
|
|
||||||
create_if_missing: true # Auto-create if it doesn't exist
|
|
||||||
|
|
||||||
# Sync options
|
|
||||||
sync:
|
|
||||||
sync_past_events: false
|
|
||||||
sync_future_events: true
|
|
||||||
sync_future_days: 7
|
|
||||||
|
|
||||||
# Event filtering
|
# Optional filtering configuration
|
||||||
filters:
|
[filters]
|
||||||
events:
|
# Keywords to filter events by (events containing any of these will be included)
|
||||||
exclude_patterns:
|
keywords = ["work", "meeting", "project"]
|
||||||
- "Cancelled:"
|
# Keywords to exclude (events containing any of these will be excluded)
|
||||||
- "BLOCKED"
|
exclude_keywords = ["personal", "holiday", "cancelled"]
|
||||||
|
# Minimum event duration in minutes
|
||||||
# Time-based filters
|
min_duration_minutes = 5
|
||||||
min_duration_minutes: 5
|
# Maximum event duration in hours
|
||||||
max_duration_hours: 24
|
max_duration_hours = 24
|
||||||
|
|
||||||
# Status filters
|
|
||||||
include_status: ["confirmed", "tentative"]
|
|
||||||
exclude_status: ["cancelled"]
|
|
||||||
|
|
||||||
# Logging
|
# Import Configuration (for unidirectional sync to target server)
|
||||||
logging:
|
[import]
|
||||||
level: "info"
|
# Target server configuration (e.g., Nextcloud)
|
||||||
format: "text"
|
[import.target_server]
|
||||||
file: "caldav-sync.log"
|
# Nextcloud CalDAV URL
|
||||||
max_size: "10MB"
|
url = "https://your-nextcloud-domain.com/remote.php/dav/calendars/username/"
|
||||||
max_files: 3
|
# Username for Nextcloud authentication
|
||||||
|
username = "your-nextcloud-username"
|
||||||
|
# Password for Nextcloud authentication (use app-specific password)
|
||||||
|
password = "your-nextcloud-app-password"
|
||||||
|
# Whether to use HTTPS (recommended)
|
||||||
|
use_https = true
|
||||||
|
# Request timeout in seconds
|
||||||
|
timeout = 30
|
||||||
|
|
||||||
# Performance settings
|
# Target calendar configuration
|
||||||
performance:
|
[import.target_calendar]
|
||||||
max_concurrent_syncs: 3
|
# Target calendar name
|
||||||
batch_size: 25
|
name = "Imported-Zoho-Events"
|
||||||
retry_attempts: 3
|
# Target calendar display name (optional - will be discovered from server if not specified)
|
||||||
retry_delay: 5 # seconds
|
display_name = ""
|
||||||
|
# Target calendar color (optional - will be discovered from server if not specified)
|
||||||
|
color = ""
|
||||||
|
# Target calendar timezone (optional - will be discovered from server if not specified)
|
||||||
|
timezone = ""
|
||||||
|
# Whether this calendar is enabled for import
|
||||||
|
enabled = true
|
||||||
|
|
||||||
# Security settings
|
# Import behavior settings
|
||||||
security:
|
overwrite_existing = true # Source always wins - overwrite target events
|
||||||
ssl_verify: true
|
delete_missing = false # Don't delete events missing from source
|
||||||
encryption: "tls12"
|
dry_run = false # Set to true for preview mode
|
||||||
|
batch_size = 50 # Number of events to process in each batch
|
||||||
|
create_target_calendar = true # Create target calendar if it doesn't exist
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue