-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add a toml config parser #23
Comments
This seems interesting and potentially not too tricky. I have 2 questions. Firstly, what would an example static config file look like? Secondly, what filepath would it be in? I think I could figure something out here but had these questions first before I draft something. Thanks |
There is an example of bitcoind configuration file available here: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/bitcoin.conf-annotated.txt Relevant documentations can be:
Note bitcoin configuration file is not “pure” toml if i’m remembering correctly though approaching the syntax. In my opinion, the main advantage of using TOML over JSON is the ability to add comments (if you have custom settings and wanna remember why years after) and that it’s more straighforward to edit by hand (rather than JSON which is more verbose).
If you have more questions, I’m looking forward to answer them, my pleasure. |
I would imagine this toml config file would change overtime so the parser script would need to be updated. We could assume a toml like this
Then I could write a rust script to parse it. Both would need to updated so setting a clear consensus on the pattern for that would be great before writing code. What do you think of using the above as a basis? |
Yes the example given is a good one and if it can parse something of this complexity for the v0.1 of a toml config parser, I’ll take it. For the name of the variables, matching |
Closed with #29. |
civkitd
will need a static config file on the host to discover its default settings and learn where is the nostr event database. We have alreadyclap
as a dependency so it can be used to build a parser of a TOML config file.The text was updated successfully, but these errors were encountered: