So I have an idea for functionality to allow the user to rapidly select from appropriate images for a card.
- The backend is fairly simple: take an array of terms and a search type (object with relevant info, e.g. info for ddg API, Beautiful Soup or however it is implemented). Perform the search type for each element and return an array of URLs of found images.
- Bulk frontend presents a field to paste/type the list of terms, press “fetch” and the backend fetches accordingly. When highlighting one term displays the found images for that term in another pane, user marks the ones to retain and press “generate note” to make a note with the term and image(s) (obviously there are a few options like which deck, note type, what goes in which field, wrap images with custom HTML, add Anki tag etc). General idea: from a list of terms (e.g. anatomy list) quickly generate notes from web resources (there are several sites that have very good images that can be found via search enginges). This is the reason I want to make the add-on in the first place.
- Editor frontend should be an additional pane to the editor window, highlight something in the editor and press “fetch” (or hit shortcut etc.) and the backend fetches the images. Images are presented in the add-on pane and the user can d&d or copy-paste the wanted images in the editor field. General idea: rapidly adding relevant images when editing notes. This is just value added.
- One could make a similar function to generate links to relevant online wiki-style resources.
So 99% of the code is Anki GUI, great thing I don’t have a python background and haven’t touched Qt since forever.
Anyone who thinks “ah, I know exactly how to do that, here are some pointers”?