Anki add-on: rebuild/empty some or all filtered decks

An Anki add-on that adds "Rebuild All" and "Empty All" buttons to the bottom of the main screen, to rebuild or empty filtered decks at once. By default all decks are emptied and rebuild. By changing the configuration you can limit the effect of these buttons (despite their names) to rebuild only some decks (the config options are "rebuild all except for" and "rebuilt only these"). Make sure to sync all changes on other devices to your desktop before you do any emptying/rebuilding . This avoids scheduling problems like lost repetitions . The anki creator explains why: "Moving cards to a different deck marks them as modified, and if you then sync to a device that has earlier pending changes, those changes will be overridden with the more recent change. To ensure this doesn’t happen, you need to make sure all changes made on other devices have been synced to your desktop before you do any emptying/rebuilding. " This is not a bug in my add-on or the other "Rebuild All"/"Empty All" add-ons. This is also not a bug in Anki. It's just a mismatch. The filtered decks feature was not designed for batch rebuilds so when an add-on nevertheless does them there are some side effects. If you have substantial parts of your collection in filtered decks this also means that much more than expected has to be synced which could take much longer etc. This add-on does not and will not include an Auto-Rebuild feature (as it used to have) because of the lost repetition problem and because it might place an undue burden on Ankiweb. For details see here and here . The original for Anki 2.0 is here . khonkhortisan released it for 2.1 as Rebuild All & Empty All for Anki 2.1 . Arthur published his version as Automatically rebuild filtered deck . My release adds the following features: an option to set in the add-on config which decks are built first and last: This might be useful if a card matches the criteria of multiple of your filtered decks because cards can only be in one filtered deck. By default all decks are emptied and rebuild. By changing the configuration you can limit the effect of these buttons (despite their names) to rebuild only some decks (the config options are "rebuild all except for" and "rebuilt only these"). (newly added in 2023-03) it works with the add-on Slackers' Delight (Postpone/Defer Button) . Use this at your own risk. So far it has very few users. compatibility with other add-ons In 2021-04 it does not wok with the add-on Advanced Review Bottom Bar . For some background and a workaround see this discussion . # bugs, errors, feedback Please do not use reviews for bug reports or support requests. I don't get notified of your reviews, and properly troubleshooting an issue through them is nearly impossible (formatting is limited and I can't reply multiple times). If you find a bug let me know in the official anki support forum , on github . versions 2023-05-17 new option in the config that is off by default: if set to true the entries empty/rebuild will be added to the menu opened by the cog icon behind each deck name in the deckbrowser. Limitation: for 2.1.49 or earlier this resets the vertical scroll position 2023-03-20 clearer name for existing options (you might have to adjust your config), add option to only affect some filtered decks, add options to exclude some decks 2021-12-11 fix for 2.1.50/qt6, no more detection of slacker' delight that was removed from ankiweb 2021-07-05 disable hidden auto rebuild feature for 2.1.45+ which breaks in these newer versions 2020-10-08 fix for 2.1.36 2020-09-16 work with the add-on Slackers' Delight (Postpone/Defer Button) 2020-05-27 bug fix 2020-03-03 initial release

GitHub repository: ijgnd/anki__rebuild-empty-all-filtered-decks