def first(self): _bibtex.first(self.parser) return self.next()
def first (self): _bibtex.first(self.parser) return self.next()
if False: print importer("http://portal.acm.org/citation.cfm?id=277650.277719").load_bibtex() print importer("http://portal.acm.org/citation.cfm?id=324550").load_bibtex() print importer("http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.23.414").load_bibtex() test = importer("http://eprint.iacr.org/2009/137").load_bibtex() print test else: test = """@misc{cryptoeprint:2009:137, author = {Nicolas T. Courtois}, title = {The Dark Side of Security by Obscurity and Cloning MiFare Classic Rail and Building Passes Anywhere, Anytime}, howpublished = {Cryptology ePrint Archive, Report 2009/137}, year = {2009}, note = {\url{http://eprint.iacr.org/}}, }""" if "_bibtex" in sys.modules: b = _bibtex.open_string("foo", test, True) print b _bibtex.first(b) i = _bibtex.next(b) while i: print i items = i[4] for k in items.keys(): items[k] = _bibtex.expand(b, items[k], -1) print items i = _bibtex.next(b)