示例#1
0
        if len(pdfs) == 0:
            print('Nothing found. Try again!')
            continue  # New search

        p = process_pdfs(pdfs)
        if p == 'N':
            continue  # New search
        else:
            sys.exit('Finished')

sys.exit('OOPS Shouldnt get here')

#print(bb.strings)  # e.g. acp =
#   print(bb.entries_dict['Gon2013'] )
#   g= bb.entries_dict['Gon2013']
#   a= bb.entries_dict['Yttri:Urban']
#   print('doi: ' , g['doi'])

#with open('DFILE.bib','w') as dfile:
#  bibtexparser.dump(bb, dfile)

db = BibDatabase()
db.entries = [g, a]
db.entries = bb.entries
print('NOWBB', len(bb.entries_dict))  # 6297
writer = BibTexWriter()
writer.indent = '    '
writer.common_strings = False
with open('BTEST.bib', 'w') as bibfile:
    bibfile.write(writer.write(db))
               "volume",
               "series",
               "editor",
               "year",
               "month",
               "date",
               "publisher",
               "address",
               "isbn",
               "issn",
               "articleno",
               "track",
               "doi",
               "url",
               "urlsuppl1",
               "urlsuppl2",
               "urlsuppl3",
               "presentation-video", 
               "keywords",
               "abstract")

# bibtex entries indented by a single space
FIELD_INDENT = "  "

# Writer object to use for writing back nime proceedings in the correct format.
writer = BibTexWriter()
writer.indent = FIELD_INDENT
writer.display_order = FIELD_ORDER
writer.common_strings = False # would like it to write month 3-letter codes, but can't seem to avoid writing them at the start of each file weirdly.
writer.order_entries_by = ("articleno", "url", "ID")