Yes it could be cool, but I wonder were the standard styles are placed, thinking in example of using portable builds, it is feasible you have a directory where you could dig into and modify files.
With Appimages, it is a monolithic container (I know that is expandable into a directory), it will be more difficult to deploy in example on many machines of say an office.
if the standard file is copied in the user directory during installation, (eventually with a mechanism of checking the version) the local change remain even across updating FreeCAD, a somewhat extablished mechanism would be using ini files, as they are parsed by python itself using an "standard" module, and more information could be stored, say simply a field like this:
Code: Select all
[General]
version=1.0
[Style00]
...
[Style01]
and so on:
The parsing maybe is more time consuming, but I think that you have not 100 styles, it is even difficult to retain the differences, maybe 10 or 20 is a more realistic number., say style 0 to style 9 predefined and immutable and the others user defined.
The proper style is recorded in the FCSTD file, maybe with a version field, maybe internally stored as "style01-v1.0",,simply and not to difficult to parse, usign the standard python split() function.
When a new version of FreeCAD is installed at the first start the format of the "internal" annotation style version is checkhed against the local file and some decision could be made, the standard style are almost never modified, only minor adjustment could be done in the starting phase of implementation.
or maybe only the user defined styles are saved locally and the standard files are retained in the "source code".
If the decision to not to modify the annotation format but to add only a style field is done, there is no need to modify a predefined style, if a new style is needed, the user simply create a local style.
every information is stored in the FCstd file, eventually backward compatile with older FreeCAD, if the mechanism of retrieving information, is done well, the new field is not taken in account, by old program versions.
Hope to have been clear
Regards
Carlo D.