def save(self, entries, verbose=True): """Write bibkey -> (entrytype, fields) map to file.""" _bibtex.save(entries, filename=self.filepath.as_posix(), sortkey=self.sortkey, encoding=self.encoding, verbose=verbose)
def save(self, entries, verbose=True): """Write bibkey -> (entrytype, fields) map to file.""" _bibtex.save( entries, filename=self.filepath.as_posix(), sortkey=self.sortkey, encoding=self.encoding, verbose=verbose)
def to_bibfile( self, filename, encoding='utf-8', ): _bibtex.save(self.merged(), filename.as_posix(), sortkey=None, encoding=encoding)
def bibtex(api, log): bib = api.bibfiles['iso6393.bib'] glottolog_ref_ids = bib.glottolog_ref_id_map entries = [] for id_, rows in groupby(iter_change_requests(log), lambda c: c['CR Number']): entries.append( change_request_as_source(id_, list(rows), glottolog_ref_ids)) save(entries, bib.fname, None) log.info('bibtex written to {0}'.format(bib.fname)) return len(entries)
def to_bibfile(self, filename, encoding='utf-8', ): _bibtex.save(self.merged(), filename.as_posix(), sortkey=None, encoding=encoding)
def save(self, entries): """Write bibkey -> (entrytype, fields) map to file.""" _bibtex.save( entries, filename=self.fname, sortkey=self.sortkey, encoding=self.encoding)