Open benmuth opened 5 months ago
Hey, sorry that it took me so long to look at this. I was looking at your suggested code, and I noticed that you moved the call of the function config.ReadParamsINIfile(config_path)
to the main()
function inside the main.py
file. This should work well when pdf2doi
is invoked via command line, but I'm not sure if it would work well when pdf2doi
is used as a library by other scripts (for example, from pdf2bib
or pdf-renamer
. Can you run some test?
When pdf2doi
is used as a library, I think the calling code can just call pdf2doi.config.ReadParamsINIfile(config_path)
during initialization (for instance, just before where pdf2bib
and pdf-renamer
are calling pdf2doi.config.set
right now).
When
pdf2doi
is used as a library, I think the calling code can just callpdf2doi.config.ReadParamsINIfile(config_path)
during initialization (for instance, just before wherepdf2bib
andpdf-renamer
are callingpdf2doi.config.set
right now).
Yes, but this would break backward compatibility (i.e. scripts made for previous versions of pdf2doi would not work anymore)
This fixes #29.
Problems this solves:
verbose
setting was always overwritten by the CLI)Hopefully this doesn't break any use-cases/workflows. Let me know if there's anything you're skeptical about.