Skip to content

Releases

1.0.1

Choose a tag to compare

@github-actions github-actions released this 18 Aug 12:46
a48548c

What's new

This release comes with some better failure classification and a fix to a small Auto-discovery bug when installing in old venvs (thanks @Gameheld !)

Bug Fixes

1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Jul 14:28
a3c67dd

syncMyMoodle 1.0.0

Version 1.0.0 is a major rework of syncMyMoodle. Authentication,
configuration, the command-line interface, caching, download state, terminal
output, and documentation have all been redesigned.

Bug reports and feature requests are welcome in the
issue tracker.

Changes since 1.0.0-rc.1

The final release includes some refinements:

  • Browser-assisted setup is now the default
  • Omitted settings now use the documented defaults
  • Documentation has been expanded

Highlights

Authentication has been redesigned

syncMyMoodle no longer requires your RWTH password or TOTP seed to be stored in
its configuration file.

Setup signs in once, obtains Moodle tokens, and stores those tokens separately
from the configuration. Normal syncs reuse the stored Moodle API token without
contacting RWTH SSO or requesting your RWTH credentials again.

Moodle tokens can be stored in:

  • The system keyring
  • An environment file managed by syncMyMoodle

The new authentication system also adds:

  • Interactive first-time setup with syncmymoodle setup
  • Browser-assisted login for passkeys, security keys, and other MFA methods
  • Terminal-based TOTP setup with syncmymoodle setup --totp
  • Password-manager integrations
  • Dedicated login, status, migration, forget, and reset commands
  • Validation that replacement tokens belong to the configured Moodle account
  • Automatic token recovery when a reusable TOTP provider is configured

Browser-assisted setup is the default:

syncmymoodle setup

Accounts using terminal-based RWTH password and TOTP authentication can use:

syncmymoodle setup --totp

Most syncs require only the stored Moodle token record. A new RWTH SSO login is
needed only when the record is missing, revoked, reset, or otherwise no longer
usable.

New configuration format and command-line interface

The previous JSON configuration has been replaced by a validated TOML format.

The configuration-aware CLI uses the same option definitions for configuration
validation, help text, documented defaults, and command-line overrides.
Configuration settings can therefore be overridden for a single sync without
editing the TOML file.

The redesigned command structure includes:

syncmymoodle setup
syncmymoodle config ...
syncmymoodle auth ...
syncmymoodle clean ...

Running syncmymoodle without a subcommand still starts a normal sync.

New and improved controls include:

  • --dry-run to preview a sync without writing files or caches
  • --show-filtered to explain which configuration rule excluded an item
  • File-size filters
  • Individual linked-content source controls
  • Positive and negative Boolean options
  • Per-run course, semester, filter, and download overrides
  • Configuration validation with syncmymoodle config check
  • Local conflict-copy and cache cleanup commands
  • Consistent documented defaults for omitted settings

The global configuration location can be inspected with:

syncmymoodle config path

The complete commented configuration example can be printed with:

syncmymoodle config example

Faster repeat syncs

Repeat syncs should be considerably faster, particularly for courses containing
many unchanged modules, linked resources, or H5P activities.

The new caching and state system can:

  • Skip unchanged page, assignment, and quiz requests
  • Reuse Moodle update metadata when it is reliable
  • Reuse remote metadata from Moodle, Opencast, and linked services
  • Cache extracted H5P content instead of downloading the same archive during
    every sync
  • Recognize files that are already current after partial provider failures or
    a rebuilt cache
  • Perform a final content-hash check before replacing a local file
  • Avoid repeated requests for the same resource during one sync

Caching remains conservative. When Moodle cannot reliably report whether
something changed, syncMyMoodle falls back to querying the content normally.

The exact speed improvement depends on the courses and content being synced.

More robust sync state and downloads

The download and cache state has been reworked to handle incomplete provider
data, interrupted operations, local modifications, and changed remote artifacts
more safely.

The new implementation improves:

  • Detection of files that are already up to date
  • Handling of local files modified during a sync
  • Recovery from incomplete or unavailable provider metadata
  • Detection of changed remote artifacts
  • Avoidance of false conflicts for identical files
  • Validation of paths and redirects
  • Detection of incomplete downloads
  • HTTP error handling and retries
  • Cross-platform path and storage behavior
  • Safe staging of downloads before installation
  • Protection against concurrent writing syncs in the same directory

When content is removed from Moodle, syncMyMoodle reports the removal but keeps
the existing local files.

Improved progress and terminal output

Terminal output has been rebuilt using Rich.

Interactive sessions now provide:

  • Overall sync progress
  • Per-course progress
  • Item and byte-transfer progress
  • Consistent prompts, warnings, and errors
  • Clearer filtered-item reporting
  • A consolidated final summary

Redirected output remains plain and suitable for logs or scheduled jobs.
NO_COLOR is also respected.

A failure in one course, module, or transfer normally does not stop the entire
sync. syncMyMoodle continues with the remaining work and exits nonzero after
printing the final summary.

New course and content support

This release adds:

  • Course filtering by directly assigned Moodle role
  • Support for emedia Medizin VEIRA videos
  • Multiple Opencast video tracks, such as presenter and presentation streams
  • Stable filenames for distinct Opencast track flavors
  • Improved H5P link discovery and caching
  • Quiz attempts as self-contained offline HTML, PDF, or both

Course-role filtering is available through courses.exclude_roles and the
corresponding command-line option. Courses are retained when Moodle cannot
determine the directly assigned role.

Upgrading from syncMyMoodle ≤ 0.5.0

The 1.0.0 configuration and authentication models are not backward-compatible
with the JSON configuration used by syncMyMoodle 0.5 and earlier.

Migrate an existing JSON configuration with:

syncmymoodle config migrate --input config.json

Migration:

  • Uses the existing sign-in information for one RWTH login
  • Obtains a Moodle token record for the new authentication system
  • Stores Moodle tokens separately from the new configuration
  • Writes a TOML configuration without embedding the old password or TOTP seed
  • Preserves compatible settings and legacy default behavior
  • Includes the current commented configuration structure
  • Leaves the original JSON file unchanged

Review the generated TOML configuration and complete one successful sync before
deleting the old JSON file.

The old file may contain an RWTH password or TOTP seed, so it should be removed
once it is no longer needed.

For headless installations, Moodle tokens can be migrated to an environment
file:

syncmymoodle config migrate --input config.json \
  --token-store env-file \
  --token-env-file PATH

Use --output to choose the TOML destination and --force to replace an
existing destination.

Cache migration and the first sync

The cache layout has changed in 1.0.0.

Version 0.5 stored cache data inside individual course directories. Version
1.0.0 centralizes per-course cache data beneath .syncmymoodle-cache in the
configured sync directory and uses stable course identifiers.

syncMyMoodle migrates compatible 0.5 cache data when it belongs to the matching
Moodle account. However, because the cache format, location, and tracked sync
state have changed, the first sync with 1.0.0 may need to revalidate or
redownload some files.

This is expected. Later syncs should benefit from the more comprehensive cache.

Do not manually move the old cache files before migration.

Installation

To upgrade an existing installation:

uv tool upgrade syncmymoodle

or:

pipx upgrade syncmymoodle

Verify the installed version:

syncmymoodle --version

New installations can then start with browser-assisted setup:

syncmymoodle setup
syncmymoodle

For terminal-based password and TOTP setup:

syncmymoodle setup --totp
syncmymoodle

Features

  • Add browser-assisted login (#176) @D-VR
  • Avoid unnecessary downloads on repeat syncs (#175) @D-VR
  • Make sync state handling more robust (#173) @D-VR
  • Avoid repeated requests during sync (#170) @D-VR
  • Skip unchanged Moodle module requests with incremental caching (#169) @D-VR
  • Improve sync progress and terminal output (#168) @D-VR
  • Support emedia Medizin VEIRA videos (#167) @D-VR
  • Filter courses by Moodle role (#166) @D-VR
  • Download multiple Opencast video tracks (#165) @D-VR
  • Rework authentication and harden sync reliability (#164) @D-VR
  • Refactor configuration and CLI sync controls (#162) @D-VR

Maintenance and reliability

  • Tighten safety checks before release (#174) @D-VR
  • Fix cache migration and artifact updates (#172) @D-VR
  • Simplify sync and download handling (#171) @D-VR

Before reporting a problem

Please include:

  • Your operating system
  • Python version
  • syncMyMoodle version
  • The command you ran
  • The relevant error message
  • Whether syncmymoodle config check succeeds
  • Whether syncmymoodle auth status succeeds

Remove RWTH passwords, TOTP seeds, current TOTP codes, Moodle tokens,
app-launch addresses, environment-file content...

Read more

1.0.0-rc.1

1.0.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Jul 23:02
bdcd3d1

syncMyMoodle 1.0.0-rc.1

This is the first release candidate for syncMyMoodle 1.0.0.

Version 1.0.0 is a major rework of syncMyMoodle.
Authentication, configuration, the command-line interface, caching,
download state, and terminal output have all been redesigned.

Feedback and bug reports for the release candidate are welcome in the
issue tracker.

Highlights

Authentication has been redesigned

syncMyMoodle no longer requires your RWTH password or TOTP secret to be stored
in its configuration file.

Setup now signs in once, obtains Moodle tokens, and stores those tokens
separately from the configuration. Normal syncs use the stored Moodle tokens
without contacting RWTH SSO or requesting your RWTH credentials again.

Moodle tokens can be stored in:

  • The system keyring
  • An environment file managed by syncMyMoodle

The new authentication system also adds:

  • Interactive first-time setup with syncmymoodle setup
  • Browser-assisted login for passkeys, security keys, and other MFA methods
  • Password-manager integrations
  • Separate login, status, migration, reset, and cleanup commands
  • Validation that replacement tokens belong to the configured Moodle account
  • Automatic token recovery when a reusable sign-in provider is configured

Browser-assisted login can be selected during setup:

syncmymoodle setup --browser

Accounts using the regular RWTH password and TOTP flow can use:

syncmymoodle setup

New configuration format and command-line interface

The previous JSON configuration has been replaced by a validated TOML format.

The new configuration-aware CLI uses the same option definitions for
configuration validation, help text, and command-line overrides. Configuration
settings can therefore be overridden for a single sync without editing the
TOML file.

The redesigned command structure includes:

syncmymoodle setup
syncmymoodle config ...
syncmymoodle auth ...
syncmymoodle clean ...

Running syncmymoodle without a subcommand still starts a normal sync.

New and improved controls include:

  • --dry-run to preview a sync without writing files or caches
  • --show-filtered to explain which configuration rule excluded an item
  • File-size filters
  • Individual linked-content source controls
  • Positive and negative Boolean options
  • Per-run course, semester, filter, and download overrides
  • Configuration validation with syncmymoodle config check
  • Local conflict-copy and cache cleanup commands

The global configuration location can be inspected with:

syncmymoodle config path

The complete commented configuration reference can be printed with:

syncmymoodle config example

Faster repeat syncs

Repeat syncs should be considerably faster, particularly for courses containing
many unchanged modules, linked resources, or H5P packages.

The new caching and state system can:

  • Skip unchanged page, assignment, and quiz requests
  • Reuse Moodle update metadata when it is reliable
  • Reuse remote metadata from Moodle, Opencast, and linked services
  • Cache extracted H5P content instead of downloading the same archive during
    every sync
  • Recognize files that are already current after partial provider failures or
    a rebuilt cache
  • Perform a final content hash check before replacing a local file
  • Avoid repeated requests for the same resource during one sync

Caching remains conservative. When Moodle cannot reliably report whether
something changed, syncMyMoodle falls back to querying the content normally.

The exact speed improvement depends on the courses and content being synced.

More robust sync state and downloads

The download and cache state has been reworked to handle incomplete provider
data, interrupted operations, local modifications, and changed remote artifacts
more safely.

The new implementation improves:

  • Detection of files that are already up to date
  • Handling of local files modified during a sync
  • Recovery from incomplete or unavailable provider metadata
  • Detection of changed remote artifacts
  • Avoidance of false conflicts for identical files
  • Validation of paths and redirects
  • Detection of incomplete downloads
  • HTTP error handling and retries
  • Cross-platform path and storage behavior

Improved progress and terminal output

Terminal output has been rebuilt using Rich.

Interactive sessions now provide:

  • Overall sync progress
  • Per-course progress
  • Item and byte-transfer progress
  • Consistent prompts, warnings, and errors
  • Clearer filtered-item reporting
  • A consolidated final summary

Redirected output remains plain and suitable for logs or scheduled jobs.
NO_COLOR is also respected.

New course and content support

This release adds:

  • Course filtering by directly assigned Moodle role
  • Support for emedia Medizin VEIRA videos
  • Multiple Opencast video tracks, such as presenter and presentation streams
  • Stable filenames for distinct Opencast track flavors
  • Improved H5P handling and caching

Course-role filtering is available through courses.exclude_roles and the
corresponding command-line option. Courses are retained when Moodle cannot
determine the assigned role.

Upgrading from <=0.5.0

The 1.0.0 configuration and authentication models are not backward-compatible
with the <=0.5.0 JSON configuration.

Migrate an existing JSON configuration with:

syncmymoodle config migrate --input config.json

Migration:

  • Uses the existing sign-in information for one RWTH login
  • Obtains a Moodle token record for the new authentication system
  • Stores Moodle tokens separately from the new configuration
  • Writes a TOML configuration without embedding the old password or TOTP secret
  • Preserves compatible settings and example comments
  • Leaves the original JSON file unchanged

Review the generated TOML configuration and complete one successful sync before
deleting the old JSON file.

The old file may contain an RWTH password or TOTP secret, so it should be
removed once it is no longer needed.

For headless installations, Moodle tokens can be migrated to an environment
file:

syncmymoodle config migrate --input config.json \
  --token-store env-file \
  --token-env-file PATH

Use --output to choose the TOML destination and --force to replace an
existing destination.

Cache migration and the first sync

The cache layout has changed in 1.0.0.

Version 0.5.0 stored cache data inside individual course directories. Version 1.0.0
centralizes per-course cache data beneath .syncmymoodle-cache in the configured
sync directory, using stable course identifiers.

syncMyMoodle migrates compatible 0.5.0 cache data when it belongs to the matching
Moodle account. However, because the cache format, location, and tracked sync
state have changed, the first sync with 1.0.0 may need to revalidate or redownload
some files.

This is expected. Later syncs should benefit from the more comprehensive cache.

Do not manually move the old cache files before migration.

Installation

The release candidate is available from PyPI.

Using uv:

uv tool install "syncmymoodle==1.0.0rc1"

Using pipx:

pipx install "syncmymoodle==1.0.0rc1"

Verify the installed version with:

syncmymoodle --version

New installations can then start with:

syncmymoodle setup
syncmymoodle

Use browser-assisted setup for passkeys, security keys, or other browser-based
MFA methods:

syncmymoodle setup --browser

Features

  • Add browser-assisted login (#176) @D-VR
  • Avoid unnecessary downloads on repeat syncs (#175) @D-VR
  • Make sync state handling more robust (#173) @D-VR
  • Avoid repeated requests during sync (#170) @D-VR
  • Skip unchanged Moodle module requests with incremental caching (#169) @D-VR
  • Improve sync progress and terminal output (#168) @D-VR
  • Support emedia Medizin VEIRA videos (#167) @D-VR
  • Filter courses by Moodle role (#166) @D-VR
  • Download multiple Opencast video tracks (#165) @D-VR
  • Rework authentication and harden sync reliability (#164) @D-VR
  • Refactor configuration and CLI sync controls (#162) @D-VR

Maintenance and reliability

  • Tighten safety checks before release (#174) @D-VR
  • Fix cache migration and artifact updates (#172) @D-VR
  • Simplify sync and download handling (#171) @D-VR

Before reporting a problem

Please include:

  • Your operating system
  • Python version
  • syncMyMoodle version
  • The command you ran
  • The relevant error message
  • Whether syncmymoodle config check succeeds
  • Whether syncmymoodle auth status succeeds

Remove RWTH passwords, TOTP secrets, Moodle tokens, app-link addresses,
environment-file contents, and private course information before posting logs
or screenshots.

0.5.0

Choose a tag to compare

@github-actions github-actions released this 07 Jul 12:46
0.5.0
06cdc77

What's new

This release mostly fixes rough edges from previous features, and contains a big refactor of syncMyMoodle into focused Modules. Goodbye monolithic __main__py!

Also: Quiz attempt snapshots are back (this time without RCE!). They are saved as offline HTML files, and you can optionally render them to PDF with a local Chrome/Chromium/Edge install.

Repeated syncs should also be much less annoying now. syncMyMoodle keeps better cache metadata and should skip files that are already up to date instead of downloading them again every run.

There are also a few Windows fixes. syncMyMoodle should no longer crash on Unix-only file permission calls, and it now handles Windows-reserved filenames, long paths, and case-insensitive filename clashes more carefully.

Features

  • Re-add safe quiz attempt snapshots (#160) @D-VR

Bug Fixes

  • Fix Windows file storage, permissions, long paths, and filename handling (#163) (thanks for the report @OsziBatyam !) @D-VR
  • Harden CLI and Moodle API error handling (#156) @D-VR
  • Fix repeated downloads for unchanged files (#154) @D-VR
  • Fix Sciebo share token extraction for newer Nextcloud versions (#153) @D-VR

Maintenance

  • Replace black, isort, and flake8 with ruff (#158) @D-VR
  • Replace http.client wstoken workaround with requests (#157) @D-VR
  • Refactor download decisions and cache metadata (#155) @D-VR
  • Split the old __main__.py monolith into focused typed modules (#151, #152) @D-VR

0.4.1

Choose a tag to compare

@github-actions github-actions released this 02 Jul 14:34
b8850f2

Small update which fixes several edge cases which could have lead to data-loss and non updating files.
If you experience any issues, please open a github issue!

What's new

  • Add behavioral sync test suite (#149) @D-VR

Bug Fixes

  • Fix ETag-fallback conflict bug (#149) @D-VR
  • Fix multiple data-loss and silent-staleness bugs in download, sync filtering, and caching (#150) @D-VR

0.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Jun 16:30
0.4.0
a5dffca

What's new

This release should make syncing faster. Testing my Moodle courses showed that scanning
the Moodle file tree was about 29% faster and needed about 38% fewer HTTP requests.

There are also a few new knobs. You can now skip links, domains, sections, or individual modules, and
course folders can move prefixes like (VO) to the end of the folder name with course_prefix_handling.

There are some other smaller improvements as well.

This release also comes with some security hardening, including dropping the unsafe e-test pdf creator,
not using pickle for cache files, and setting more restrictive file permissions for cache files.

Features

  • Add configurable course prefix handling (#148) @D-VR
  • Remove unused Opencast download indirection (#147) @D-VR
  • Add configurable skip rules for links, domains, sections, and modules (#143) @D-VR
  • Improve Moodle availability diagnostics (#142) @D-VR
  • Preserve nested Moodle folder paths (#140) @D-VR
  • Cache Sciebo link resolution per run (#139) @D-VR

Bug Fixes

  • Harden local storage and disable quiz PDFs (#146) @D-VR
  • Skip failed external file downloads (#144) @D-VR
  • Scan assignment intros for Opencast links (#141) @D-VR

Maintenance

  • Remove unused Opencast download indirection (#147) @D-VR
  • Harden local storage and disable quiz PDFs (#146) @D-VR
  • Reduce redundant sync requests (#145) @D-VR
  • Remove unused root cache option (#137) @D-VR

0.3.1

Choose a tag to compare

@github-actions github-actions released this 19 Jun 10:04

What's new

Features

Bug Fixes

Maintenance

  • Bump version to 0.3.1 (#136) @D-VR
  • Improve release workflow and packaging metadata (#135) @D-VR

0.3.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 23:27
24e7c0a

What's new

Now supports updating files if they are changed in Moodle or Sciebo!
Just set --updatefiles or "update_files": true,.
Configure sync conflict strategy with updatefilesconflict. By default any file you modified will not get overwritten.
You can now also install syncmymoodle as a tool! You no longer need to add python -m infront of it to run.

Features

Bug Fixes

  • Prevent interrupted Downloads from becoming corrupted upon restart. If you still encounter corrupted files when downloading, please comment in #74

Maintenance

  • add automatic github releases and pypi publishing (#131) @D-VR