def _availClozeOrds(self, m: NotetypeDict, flds: str, allowEmpty: bool = True) -> List[int]: print( "_availClozeOrds() is deprecated; use note.cloze_numbers_in_fields()" ) note = _pb.Note(fields=[flds]) return list(self.col._backend.cloze_numbers_in_note(note))
def to_backend_note(self) -> _pb.Note: hooks.note_will_flush(self) return _pb.Note( id=self.id, guid=self.guid, notetype_id=self.mid, mtime_secs=self.mod, usn=self.usn, tags=self.tags, fields=self.fields, )
def new_note(self, ntid: int) -> pb.Note: input = pb.NoteTypeID(ntid=ntid) output = pb.Note() output.ParseFromString(self._run_command(68, input)) return output
def get_note(self, nid: int) -> pb.Note: input = pb.NoteID(nid=nid) output = pb.Note() output.ParseFromString(self._run_command(71, input)) return output
def _availClozeOrds( self, notetype: NotetypeDict, flds: str, allow_empty: bool = True ) -> List[int]: note = _pb.Note(fields=[flds]) return list(self.col._backend.cloze_numbers_in_note(note))