[TW5] A question about configuration and Bob

52 views
Skip to first unread message

Jed Carty

unread,
Aug 24, 2018, 8:11:17 AM8/24/18
to TiddlyWiki
I have switched to using TOML instead of json for the configuration in most of my projects. It is a simpler format. You don't have to worry about commas and matching braces and the like. It also allows comments.

Before I switch Bob to use TOML I wanted to make sure that there aren't any big objections to the change.


As an example, this is an example settings file for Bob in json:
{
 
"scripts": {
   
"NewWiki": "tiddlywiki #wikiName --init #editionName"
 
},
 
"wikis": {
   
"AWiki": "/some/path",
   
"WikiGroup": {
     
"AnotherWiki": "/some/other/path"
   
}
 
},
 
"ws-server": {
   
"port": 8080,
   
"host": "127.0.0.1",
   
"autoIncrementPort": false
 
},
 
"heartbeat": {
   
"interval": 1000
 
}
}

This is the same file in TOML (indentation and blank lines are only for clarity, they aren't required) The specfication for TOML is here:

#this can also have comments!
[scripts]
 
NewWiki: "tiddlywiki #wikiName --init #editionName"

[wikis]
 
AWiki = "/some/path"

 
[wikis.WikiGroup]
 
AnotherWiki = "/some/other/path"

[ws-server]
 port
: 8080
 host
: "127.0.0.1"
 autoIncrementPort
: false

[heartbeat]
 interval
: 1000


@TiddlyTweeter

unread,
Aug 24, 2018, 2:39:03 PM8/24/18
to TiddlyWiki
Jed the TOML looks fine. I also like it because its easy to add comments.

best, josiah
Reply all
Reply to author
Forward
0 new messages