telegram-export
telegram-export copied to clipboard
Create a default config file if it doesn't exist
This would also be a nice way to generate consistent config files with the actual defaults used in the code, instead maintaining them separately.
We already do provide a default config file, albeit online. We could download it, I suppose, but the user still needs to manually provide some values.
The idea is to get rid of that config file and generate a sane default one on the first run, which the user can modify.
@Lonami I like having an actual file to reference, instead of something generated at runtime
@expectocode but if we generate the default file if the chosen one doesn't exist lets us easily be consistent with default values in the code and the file. Adding comments and templating the values before writing isn't hard.
Although templating values and keeping comments around is still kind of weird. Maybe just bundle the config file for PyPi or something.
@Lonami Perhaps we could use something like https://stackoverflow.com/questions/40193112/python-setuptools-distribute-configuration-files-to-os-specific-directories