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 (
Union
[str
,Path
]) – BibTeX filedb_filename (
Union
[str
,Path
]) – Journal database fileout_filename (
Union
[str
,Path
]) – Modified BibTeX filelog – LogClass or logger object
- Variables
bibtex_content (str) – BiBTeX content (from
import_file
method)db_dict (dict) – Journal database dict (from
import_database
method)bibtex_revised (str) – BibTeX content (from
replace
method)
-
import_database
()¶ Import journal database file
- Return type
dict
-
import_file
()¶ Import BibTeX file
- Return type
str
-
replace
()¶ Replace journal abbreviations
- Return type
str
-
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: Logging level is set to DEBUG for file and INFO for stdout
- To use:
log = LogClass(logfile).get_logger()
- Parameters
logfile (
Union
[str
,Path
]) – Filename for log file
-
get_logger
()¶ - Return type
Logger