NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
204 stars 41 forks source link

Make it possible to set the path to projects.cfg using an environment variable #211

Closed osma closed 6 years ago

osma commented 6 years ago

As noted in #195, it should be possible to set the path to projects.cfg using an environment variable, e.g.

export ANNIF_PROJECTS=/etc/annif/projects.cfg
annif analyze tfidf-fi <doc.txt
osma commented 6 years ago

Flask documentation: http://flask.pocoo.org/docs/1.0/config/#configuring-from-environment-variables

osma commented 6 years ago

It makes sense to do this in default_config.py, and to also allow setting ANNIF_DATADIR.