kraft icon indicating copy to clipboard operation
kraft copied to clipboard

Remove hard coded directory names and consolidate kraftrc; document kraftrc options

Open noseshimself opened this issue 2 years ago • 2 comments

in src/kraftsettings.kcfg there are definitions for

[system]
XmlArchivePath
XmlDocPath

[reporting]
PdfOutputDir

Considering the option of using a directory covered by a synchronization mechanism it might be adviable to make any path configurable and add provisions for setting a common root in a new section, e. g.

[locations]
KraftRootDir
DBDir
PDFOutputDir
XmlArchivePath
XmlDocPath

If any of the variables is not set an internal default path may be used. If any of the variables is not starting with a "/" it should be prefixed by KraftRootDir.

Documentation of kraftrc should either be added to the manual or by commenting a default kraftrc that is generated on the first run.

noseshimself avatar Jul 01 '22 19:07 noseshimself

Do I get it right: By setting the option KraftRootDir you want to "redirect" all others to be relative to that directory? But you can still set an absolute path to one of the others?

dragotin avatar Jul 01 '22 21:07 dragotin

Yes. That change will enable me to direct things into the right channels in relation to having different base path names (e. g. due to different setup of *cloud on Windows and ChromeOS).

I would love it even more if all the other parameters could be put into the database tobe distributed.

At the same time I've seen an installation where someone was using rooted paths for his configuration -- so for backward compatibility respecting a leading "/" would be necessary.

noseshimself avatar Jul 05 '22 13:07 noseshimself