Make config file optional
benmuth opened this issue · 1 comments
pdf2doi
currently reads or creates an INI file every time it's imported (in the __init__.py
file). When used as a Python dependency in a Docker project, this file is created in the system-wide Python installation directory, causing permissions issues.
There might be a better workaround I'm not aware of, but to fix this, I'm just manually changing the permissions for the pdf2doi
installation directory in the Dockerfile, to allow writing and execution, which is a bit of a hack. It's also for something not really necessary for my particular use case. I would be happy to just set the configuration in memory every time my script is run instead of having it be read from a file.
Would it be acceptable to make use of the config file optional, especially when used as a package instead of a standalone script? If this makes sense, I'd be willing to open a PR to implement it.
Thanks for the tool, it's very helpful :)
That sounds like a nice suggestion. I dont have much time to work on it in the next future, but you are very welcome to submit a PR! :)