The Converter class

class academic_ads_bibtex.converter.Convert(filename, db_filename, out_filename, log=None)

Bases: object

Main class to perform BibTeX conversion for Academic compatibility

Parameters
  • filename – str or pathlib.Path object

  • db_filename – str or pathlib.Path object

  • out_filename – str or pathlib.Path object

  • log – LogClass or logger object

Variables
  • bibtex_content – str (from import_file)

  • db_dict – dict of journal database (from import_database)

  • bibtex_revised – str (from replace)

import_file()

Import BibTeX file

import_database()

Import journal database file

replace()

Replace journal abbreviations

write_file()

Write revised BibTeX file

import_database()

Import journal database file

import_file()

Import BibTeX file

replace()

Replace journal abbreviations

write_file()

Write revised BibTeX file

The LogClass class

class academic_ads_bibtex.logger.LogClass(logfile)

Bases: object

Main class to log information to stdout and ASCII logfile.

Note: This code is identical to the one used in:

https://github.com/ualibraries/LD_Cool_P

Note: Logging level is set for DEBUG for file and INFO for stdout

To use:

log = LogClass(logfile).get_logger()

Parameters

logfile – str or pathlib.Path object for logging file

get_logger()