anki.importing.noteimp#
Attributes#
Classes#
An temporary object storing fields and attributes. |
|
Module Contents#
- anki.importing.noteimp.TagMappedUpdate#
- anki.importing.noteimp.TagModifiedUpdate#
- anki.importing.noteimp.NoTagUpdate#
- anki.importing.noteimp.Updates#
- class anki.importing.noteimp.ForeignNote#
An temporary object storing fields and attributes.
- fields: list[str] = []#
- tags: list[str] = []#
- deck = None#
- cards: dict[int, ForeignCard]#
- fieldsStr = ''#
- anki.importing.noteimp.UPDATE_MODE = 0#
- anki.importing.noteimp.IGNORE_MODE = 1#
- anki.importing.noteimp.ADD_MODE = 2#
- class anki.importing.noteimp.NoteImporter(col: anki.collection.Collection, file: str)#
Bases:
anki.importing.base.Importer- needMapper = True#
- needDelimiter = False#
- allowHTML = False#
- importMode = 0#
- mapping: list[str] | None#
- tagModified: str | None#
- model#
- run() None#
Import.
- fields() int#
The number of fields.
- initMapping() None#
- mappingOk() bool#
- foreignNotes() list#
Return a list of foreign notes for importing.
- importNotes(notes: list[ForeignNote]) None#
Convert each card into a note, apply attributes and add to col.
- newData(n: ForeignNote) tuple[anki.notes.NoteId, str, anki.models.NotetypeId, int, int, str, str, str, int, int, str]#
- addNew(rows: list[tuple[anki.notes.NoteId, str, anki.models.NotetypeId, int, int, str, str, str, int, int, str]]) None#
- updateData(n: ForeignNote, id: anki.notes.NoteId, sflds: list[str]) Updates | None#
- addUpdates(rows: list[Updates]) None#
- processFields(note: ForeignNote, fields: list[str] | None = None) None#
- updateCards() None#