Anki add-on: Automatically rebuild filtered deck - Enhanced Edition

This add-on is an enhanced fork of the original “Automatically rebuild filtered decks” add-on. Original: https://ankiweb.net/shared/info/1997713323 It adds Rebuild All and Empty All buttons to the main deck screen and can safely refresh filtered decks automatically. Fixed: cross-device review progress being overwritten Previous versions rebuilt filtered decks immediately when the desktop profile opened or closed, before Anki's automatic synchronization. Rebuilding moves cards and marks their records as modified. If AnkiDroid or AnkiMobile had already uploaded a newer review, the stale desktop card could therefore be marked as modified later and overwrite the mobile scheduling state during sync. This issue is fixed in this release: Startup: sync successfully → verify no changes remain pending → rebuild → sync the rebuilt state. Shutdown: sync successfully → verify → rebuild → sync again → close. If AnkiWeb login, automatic sync, or the pre-rebuild sync is unavailable or unsuccessful, the automatic rebuild is skipped instead of modifying potentially stale cards. Guards prevent recursive sync/rebuild loops. The manual Rebuild All and Empty All buttons remain available. Issue: https://github.com/Nightwindx/Automatically-rebuild-filtered-deck---Enhanced-Edition/issues/1 Configuration rebuild_after_startup_sync : safely rebuild after a successful startup sync. Default: true . safe_rebuild_on_shutdown : safely rebuild while closing. Default: true . sync_after_rebuild : upload automatic rebuild changes immediately. Default: true . time : optional rebuild timing after adding a note. Default: null . Keep time set to null when another device may be reviewing concurrently, because add-after-note rebuilding does not perform the same pre-sync cycle. Important multi-device requirement The other device must upload its changes before the desktop can receive them. No add-on can protect reviews that still exist only on an offline or unsynchronized device.

GitHub repository: nightwindx/automatically-rebuild-filtered-deck---enhanced-edition
Languages: Python