Skip to content

Latest commit

 

History

History
13 lines (6 loc) · 2.56 KB

SpchtBuilder.md

File metadata and controls

13 lines (6 loc) · 2.56 KB

Spcht Builder

A spcht.json file is, in general terms, a tree like data structure that gets crawled over by a somewhat specialised program that interprets the given signals based on the data it got. Its a simple and blunt tool, similar to those wild-west self-playing pianos. It runs down its etchings and does things. This kind of structures seems fit for the given task. Spcht was created with the desire to make it possible to edit the files by hand, the main motivation for discarding more complex formats like XML. With further progress in the project a simple GUI was written to test if a given file is valid. Later it appeared that this tool could be improved and shortly after a full edit suit was conceived, violating the original thought. The resulting GUI is not always clear in its ways, to make it easier to understand how it works under the hood the following text was written.

As mentioned above, the tree-like structure, with all its branches, is somewhat human readable for edit-purposes but a nightmare to get into a proper GUI when screen space is at a premium. Simply copying the tree structure might be confusing and outright mind numbing when used on more complex structures like the one used in foliotools. A main part of SpchtBuilder is the different file structures, it becomes more similar to a relational database than to a tree structure, a method to make the presented information more linear.

SpchtStructure

The image shows the difference between the structures of the two file formats. The two formats should be convert into each other without losing any vital information. To preserve the aforementioned tree structure a spchtbuilder.json links nodes by their name. Hand written spcht.json files wont have any names despite it being a perfectly valid node-property. SpchtBuilder will generate names where it sees fit and maintain uniqueness among the names. While a name might be theoretically every UTF-8 character (which includes emojis) its strongly advised to keep to ASCII.

Putting long, boring and/or repeating data outside in separate file was an idea when the only method to write a spcht.json was by hand. A spchtbuilder file will contain that data and, if possible, deduplicate entries that are exactly the same but. By that logic a spchtbuilder file is less readable but more transportable but also not executable. Although, at this point one could easily just give SpchtCore the ability to utilise the package function of spchtbuilder to generate a full spcht file on the fly. This functionality is not present as the time of this writing.