Ha! I've been wanting such a thing for so long!
I actually laid my first stone in my archan project, something like 6 years ago:
configconfig_file = os.path.join(current_dir, '.configconfig')
default_config_dir = os.path.join(current_dir, 'config')
if os.path.isfile(configconfig_file):
with open(configconfig_file) as f:
config_dir = os.path.join(current_dir, f.read().strip())
This code reads a .configconfig file if it exists, and its contents points to actual configuration folder the user uses to store their config files. Explained in the README:
Archan applies the following methods to find the configuration file folder:
read the contents of the file .configconfig in the current directory to get the path to the configuration directory,
use config folder in the current directory if it exists,
use the current directory.
The issue is that I never applied this in any other project, and never promoted/advertised the concept!
I'm so glad someone else did :smile:
And yours is even simpler: just use a .config folder by default :+1:
I'll support this in my Python tools :tada: (which btw already all use a config folder to store their own config files)
Ha! I've been wanting such a thing for so long! I actually laid my first stone in my archan project, something like 6 years ago:
This code reads a
.configconfig
file if it exists, and its contents points to actual configuration folder the user uses to store their config files. Explained in the README:The issue is that I never applied this in any other project, and never promoted/advertised the concept!
I'm so glad someone else did :smile: And yours is even simpler: just use a
.config
folder by default :+1: I'll support this in my Python tools :tada: (which btw already all use aconfig
folder to store their own config files)