def _read_next_bibcode(self, bibcode): """read all the info for the passed bibcode into a dict""" d = {} d['canonical'] = bibcode for x in data_files.keys(): if x != 'canonical': v = self.readers[x].read_value_for(bibcode) d.update(v) return d
def _close_all(self): for x in data_files.keys(): if x in self.readers: self.readers[x].close() self.readers.pop(x)
def _open_all(self): """open all input files""" self.readers = {} for x in data_files.keys(): self.readers[x] = reader.NonbibFileReader(x, data_files[x])