Anki add-on: Deck Renumberer

Deck Renumberer v2 helps reorganize numbered lecture decks. If you have decks like: Intro Localization Headache Stroke Coma you can select the parent deck, drag the child decks into the order you want, preview the planned changes, and apply automatic sequential renumbering. Features: Adds Tools -> Renumber Decks v2... Shows direct child decks under a selected parent deck Drag-and-drop reorder interface Preview table before applying changes Renumbers matched decks based on their position in the list Skips unmatched child decks safely Preserves the rest of the deck name after the number Supports duplicate/out-of-order numbers Uses Anki's official deck rename API only Runs a collection quick check before/after renaming Creates a forced Anki backup before renaming Blocks known collision/temp-name failure cases Default pattern: Matches names like: 01) Lecture Name Produces names like: 01) Lecture Name The pattern is configurable in Tools -> Add-ons -> Deck Renumberer v2 -> Config. Safety notes: This add-on renames decks. Before first use, create a backup and test on a copied deck or secondary profile. Recommended workflow: File -> Create Backup Open Tools -> Renumber Decks v2... Select the parent deck Drag child decks into the desired order Review the preview Apply Run Tools -> Check Database Confirm deck names/card counts before syncing Avoid running this while AnkiWeb sync, AnkiHub, or other add-ons are actively updating the same decks. Tested with: Anki 25.07.5 macOS Numbered lecture decks with duplicate and out-of-order numbers Sandbox profile, secondary profile, main profile, database check, close/reopen, and sync Config Description Default config: { "detect_regex": "^(\d+)\)\s*(.*)$", "new_prefix_format": "{n:02d}) ", "start_number": 1, "enable_apply_mode": true, "create_backup_before_rename": true, "require_quick_check": true, "max_renames_per_run": 50 } detect_regex: Regex with group 1 as the old number and group 2 as the remaining deck name. new_prefix_format: Python format string for the new number prefix. Uses {n}. Examples: Lecture Name: detect_regex = ^(\d+)\)\s*(.*)$ new_prefix_format = {n:02d}) Lecture 01 - Name: detect_regex = ^Lecture\s+(\d+)\s*-\s*(.*)$ new_prefix_format = Lecture {n:02d} -