use csv import+
v3- added cloze detection based on regex
Overview
Paste CSV directly into a dialog, auto‑detect the delimiter, optionally treat the first row as a header, auto‑select a matching note type or force one with a simple directive, and create a subdeck under the selected deck before importing.[11] The dialog also offers a one‑click Quick Import or the standard Import UI via a temporary CSV for maximum control.[11]
Highlights Paste CSV into a text box and import without saving a file.[11] Auto‑detect delimiter (comma, tab, semicolon, pipe) with csv.Sniffer and a fallback heuristic.[11] Optional “First row is header” improves field matching and status feedback.[11] Force note type via directive at the top: “#notetype:Basic” or “#notetype:Cloze”.[11] No directive? The add‑on auto‑picks a note type using header/field name similarity plus column count closeness.[11] Create a new subdeck under the currently selected deck with an inline field and button.[11] Subdeck row uses a QWidget container to avoid the child auto‑disable behavior seen with checkable group boxes in Qt.[12][13][11] Tags supported: if there are extra columns, the last column is parsed as whitespace‑separated tags.[11] How to use Open Tools → CSV Paste Import to show the dialog.[11] Paste CSV into “CSV Content”; the status strip shows detected delimiter, row count, and chosen note type.[11] Optionally check “First row is header,” choose a Target Deck, or type a name in “Add Subdeck” and click “Create subdeck”.[11] Click Quick Import for a direct add, or Import with Anki dialog to open the standard importer with a temp CSV.[11] CSV directives Add a directive at the very top to lock the model: “#notetype:Basic” or “#notetype:Cloze” on its own line.[11] Directive lines are ignored during delimiter detection and import, and the selected note type is shown as “via directive.”[11] Field mapping and tags Fields are filled left‑to‑right up to the number of fields in the selected note type.[11] If the row has more columns than fields, the last column is treated as tags and split on whitespace.[11] Status strip Shows the detected delimiter in words, total row count, and the selected note type, and reiterates the delimiter used at import time when auto‑detect is enabled.[11] Compatibility Widgets are imported via Anki’s Qt shim to remain compatible with Anki’s Qt stack.[14][11] The subdeck UI uses QWidget instead of a checkable group box to prevent unintended greyed‑out children under Qt’s default behavior.[13][12][11] Troubleshooting “Add Subdeck” looks disabled: ensure you are on this build where the row is a QWidget container and verify a target deck exists.[12][13][11] NameError for QWidget: make sure QWidget is included in the aqt.qt import list at the top of the file.[14][11] Privacy Parsing occurs locally, and a temporary file is only created when launching the standard import dialog.[11] Credits Built on Anki’s collection and Qt layers, with behavior aligned to Qt’s widget lifecycle and group‑box semantics.[12][14][11]
1 2 3 4 5 6 7 8 9 10 11 12 13 14