def run(self, from_filename, to_filename, encoding, input_encoding, output_encoding, keyless_entries, **options): from pybtex.database.format import format_database format_database(from_filename, to_filename, input_encoding=input_encoding or encoding, output_encoding=output_encoding or encoding, parser_options={'keyless_entries': keyless_entries}, **options)
def export_html(): format_database('set/ai.bib', 'set/ai.md', 'bibtex', 'md') format_database('set/iot.bib', 'set/iot.md', 'bibtex', 'md') # all_bib = open('set/_index.en.md', 'w') # all_bib.write('### Artificial Intelligence\n') # ai_bib = open('set/ai.md', 'r').read() # iot_bib = open('set/iot.md', 'r').read() # all_bib.write(ai_bib) # all_bib.write('***\n') # all_bib.write('### Internet of Things\n') # all_bib.write(iot_bib) os.remove('set/ai.bib') # os.remove('set/ai.md') os.remove('set/iot.bib')
def run( self, from_filename, to_filename, encoding, input_encoding, output_encoding, keyless_entries, **options ): from pybtex.database.format import format_database format_database( from_filename, to_filename, input_encoding=input_encoding or encoding, output_encoding=output_encoding or encoding, parser_options={'keyless_entries': keyless_entries}, **options )
from pybtex.database.format import format_database format_database('stardust_results.bib', '../publications.html', 'bibtex', 'html')