Code Description: Anki Pronunciation Fetcher
This Python script is an Anki add-on designed to automate the retrieval of IPA (International Phonetic Alphabet) transcriptions from the Cambridge Dictionary.
Key Features: Automated Scraping: Extracts the word from the first field of a note and fetches its UK/US pronunciation from the web. User Selection: Displays a custom GUI dialog allowing the user to pick specific pronunciation variants via checkboxes. Automatic Formatting: Formats selected pronunciations (e.g., UK: /…/ US: /…/) and inserts them into the fourth field (index 3) of the note. UI Integration: * Adds a toolbar button in the Editor for real-time updates. Adds a context menu item in the Browser for updating existing cards.
Live Update: Immediately refreshes the editor view so changes are visible without reloading the card.
Note: It requires the requests and beautifulsoup4 libraries to function.