dragotin / kraft

Kraft helps to handle your daily quotes and invoices in your small business.
http://volle-kraft-voraus.de
GNU General Public License v2.0
56 stars 18 forks source link

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

Open noseshimself opened 2 years ago

noseshimself commented 2 years ago

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.

dragotin commented 2 years ago

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?

noseshimself commented 2 years ago

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.