示例#1
0
def export_bibliography(collection, destination, fix_bib=False,
                        *args, **kwargs):
    bib_string = Zotero().export_bibliography(collection, *args, **kwargs)
                  
    if fix_bib:
        bib_string = fix_bibliography(bib_string)

    bib_unicode = bib_string.decode('UTF-8')
    with codecs.open(destination, encoding='UTF-8', mode='w') as output_file:
        output_file.write(bib_unicode)
示例#2
0
def export_bibliography(collection,
                        destination,
                        fix_bib=False,
                        *args,
                        **kwargs):
    bib_string = Zotero().export_bibliography(collection, *args, **kwargs)

    if fix_bib:
        bib_string = fix_bibliography(bib_string)

    bib_unicode = bib_string.decode('UTF-8')
    with codecs.open(destination, encoding='UTF-8', mode='w') as output_file:
        output_file.write(bib_unicode)
示例#3
0
def fix_bibliography_wrapper(source, destination):
    with codecs.open(source, encoding="UTF-8") as bibtex_file:
        result = fix_bibliography(bibtex_file.read())

    with codecs.open(destination, encoding='UTF-8', mode='w') as output_file:
        output_file.write(result)
示例#4
0
def fix_bibliography_wrapper(source, destination):
    with codecs.open(source, encoding="UTF-8") as bibtex_file:
        result = fix_bibliography(bibtex_file.read())

    with codecs.open(destination, encoding='UTF-8', mode='w') as output_file:
        output_file.write(result)