anki.importing.csvfile#
Classes#
Module Contents#
- class anki.importing.csvfile.TextImporter(col: anki.collection.Collection, file: str)#
Bases:
anki.importing.noteimp.NoteImporter- needDelimiter = True#
- patterns = '\t|,;:'#
- lines = None#
- fileobj: TextIO | None = None#
- delimiter: str | None = None#
- tagsToAdd: list[str] = []#
- numFields = 0#
- dialect: Any | None#
- data: str | list[str] | None#
- foreignNotes() list[anki.importing.noteimp.ForeignNote]#
Return a list of foreign notes for importing.
- open() None#
Parse the top line and determine the pattern and number of fields.
- cacheFile() None#
Read file into self.lines if not already there.
- openFile() None#
- updateDelimiter() None#
- fields() int#
Number of fields.
- close()#
Closes the open file.
- noteFromFields(fields: list[str]) anki.importing.noteimp.ForeignNote#