-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: title*
is a const, but should be defined in config.cfg
#127
Comments
I was thinking a lot about the config in general, JSON
INI
How to Validate config as-you-type on the fly?.
Note
|
At compile-timeOf course it would benefit performance and security by doing it on compile-time, but it would also limit the users possibility to do quick adjustments. If they get a new mail server, they then need to change the config and re-compile NimWC. I do have have NimWC running on devices, where Nim is not installed. macro genConfigItems(): void =
var heading: string
loop through config file:
if line.substr(0, 0) == "[":
heading = line
conintue
if heading in ["static", "config", "nochange"]:
source &= "const cfg" & itemName & " = " & itemValue
else:
source &= "let " & itemName & " = dict.getSectionValue(\"" & heading & "\",\"" & itemValue & "\")\n"
result = parseStmt(source) JSON vs INII get the point and I see the benefits. But I'm in doubt about "benefit vs time-to-change"... Types in configAs you say, the INI does not support types such as bool and int, so it would ease our job as developers to use JSON. But I think our main purpose is to ensure the ease for the end-user. |
So I am kinda using
But I wait to see how Fusion evolves, |
title*
is defined in the const-file for strings, but thetitle*
should be updated with the value specified by the user inconfig.cfg
. Otherwisetitle
will always be "Nim Website Creator". The plugins needs to be able to usetitle
to represent the user defined title.nim_websitecreator/nimwcpkg/constants/_strings.nim
Line 48 in d22fc86
The text was updated successfully, but these errors were encountered: