Donders-Institute / bidscoin

BIDScoin converts your source-level neuroimaging data to BIDS
https://bidscoin.readthedocs.io
GNU General Public License v3.0
130 stars 35 forks source link

Store user settings in a personal config file #197

Closed marcelzwiers closed 1 year ago

marcelzwiers commented 1 year ago

Users may want to use a custom template as default, without installing it in the central heuristics folder. Also, storing some persistent data can be useful, such as a flag for not showing the splash screen. It can be stored in the user home directory:

heuristics = pathlib.Path.home()/'.bidscoin'/'heuristics'
config = pathlib.Path.home()/'.bidscoin'/'config.toml'
if not config.is_file():
   config.parent.mkdir()