Subsetting the entries doesn't seem possible

Issue #127 new
Former user created an issue

So far I have not found a nicer way to get a BibliographyData object for a subset of keys. To write out a set of entries at once, I did this, which seems awfully verbose for what should be a one-liner. I would imagine there would be a function like subset_entries or something like that to extract a set of entries into a new BibliographyData

with open(os.path.join(ofpath, 'Bibliography.bib'), 'w') as fp:
    for key in all_keys:
        me = BibliographyData()
        me.entries[key] = bib_data.entries[key]
        fp.write(me.to_string('bibtex'))

Comments (0)

  1. Log in to comment