Automatically sync your All4Schools schedule with any CalDAV calendar application using Docker. Keep your school schedule organized across all your devices!
✓ Sync your All4Schools class schedule automatically
✓ Compatible with any CalDAV server (SOGo, Nextcloud, iCloud)
✓ Configurable update intervals
✓ Secure credential management
✓ Docker containerized
✓ Easy deployment
- Docker installed on your system
- CalDAV server (e.g., SOGo or iCloud)
- All4Schools login credentials
Choose one of these methods to deploy TimeSync:
Create a compose.yml file:
services:
timesync:
image: devfox1/timesync:latest
container_name: timesync
restart: unless-stopped
env_file:
- .env
Create a compose.yml file:
services:
timesync:
image: ghcr.io/xxxnikixxx/timesync:latest
container_name: timesync
restart: unless-stopped
env_file:
- .env
Clone from github using:
git clone https://github.com/xXxNIKIxXx/TimeSync.git
Create a compose.yml file:
services:
timesync:
container_name: timesync
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- .env
Create a .env file:
USERNAME="user@example.com"
PASSWORD="password"
CALENDAR_URL="https://example.com/SOGo/dav/user/Calendar/"
ALL4SCHOOLS_URL="https://example.com/"
ALL4SCHOOLS_USERNAME="username"
ALL4SCHOOLS_PASSWORD="password"
DAYS_TO_ADD=14
DAYS_TO_UPDATE=7
INTERVAL_MINUTES=5
PRINT_BAR_LENGTH=40
SLEEP_PRINT_DELAY_SECONDS=10
- Log in to your SOGo calendar.
- Select the calendar you want to use.
- Click on the three dots next to the calendar name.
- Choose "Links to this calendar" and copy the CalDAV URL.
- Create an app-specific password under App-Specific Passwords.
- Use the following Python script to list your iCloud calendars and obtain the CalDAV URL:
# list_icloud_calendars.py
import caldav
import argparse
def list_icloud_calendars(username, app_specific_password):
"""
List iCloud calendars for a given username and app-specific password.
Args:
username (str): The iCloud username.
app_specific_password (str): The app-specific password for iCloud.
Returns:
None
"""
# URL of the iCloud CalDAV server
caldav_url = 'https://caldav.icloud.com/'
# Connect to the iCloud CalDAV server
client = caldav.DAVClient(url=caldav_url, username=username, password=app_specific_password)
principal = client.principal()
# Get the calendar
calendars = principal.calendars()
for calendar in calendars:
print(f"Calendar Name: \033[94m{calendar.name}\033[0m\nURL: \033[92m{calendar.url}\033[0m\n")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='List iCloud calendars.')
parser.add_argument('-u', '--user', required=True, help='iCloud username')
parser.add_argument('-p', '--password', required=True, help='iCloud app-specific password')
args = parser.parse_args()
list_icloud_calendars(args.user, args.password)
- Run the script with your iCloud username and app-specific password to list your calendars and their URLs.
- Copy the URL for the correct calendar.
Start the container:
docker compose up -d
Check logs:
docker compose logs -f
Stop the container:
docker compose stop
Update to latest version:
docker compose pull
docker compose up -d
Common issues and solutions:
-
Authentication errors:
- Verify all credentials in
.env
- Check SOGo server accessibility
- Ensure All4Schools endpoints are correct
- Verify all credentials in
-
Connection problems:
- Confirm all URLs are valid
- Check network connectivity
- Verify SSL certificates if using HTTPS
-
Sync failures:
- Review container logs
- Verify API compatibility
- Check rate limiting settings
Pull requests are welcome! To contribute:
- Fork the repository
- Create your feature branch
- Submit a pull request