OpenEnergyPlatform / open-MaStR

A collaborative software to download the energy database Marktstammdatenregister (MaStR)
https://open-mastr.readthedocs.io/en/latest/
GNU Affero General Public License v3.0
83 stars 17 forks source link

Custom path for home directory #520

Closed FlorianK13 closed 3 months ago

FlorianK13 commented 3 months ago

It seems like the path ~/.open-mastr is not configureable. Or do you know of a way to change the home path of the downloaded files @chrwm ? We could extend the funtion def get_project_home_dir(): to read an evironment variable? Or the Mastr.init() function gets a project home path variable?

chrwm commented 3 months ago

I implemented functions already in this PR.

It reads already the variable "OUTPUT_PATH", which your can set in your environment variables or set in the main.py script

os.environ['OUTPUT_PATH'] = "/your/custom/output_path"

However, as stated it will just change the path for: csv-export, database, xml-export. The log file remains in ~/.open-mastr, from what I remember it would have been more of a hustle to change that.