forked from genewildish/Mainline
feat(graph): Add TOML-based graph configuration loader
Allow pipelines to be defined in TOML format with intuitive
node-and-connection syntax that's easy to read and edit.
- Add graph_toml.py with TOML parsing using tomllib
- Support simple format: "source": "headlines"
- Support full format: {"type": "camera", "mode": "scroll"}
- Parse connection strings in "A -> B -> C" chain format
- Add example pipeline_graph.toml demonstrating usage
Example TOML:
[nodes.source]
type = "source"
source = "headlines"
[nodes.camera]
type = "camera"
mode = "scroll"
[connections]
list = ["source -> camera -> display"]
This commit is contained in:
28
examples/pipeline_graph.toml
Normal file
28
examples/pipeline_graph.toml
Normal file
@@ -0,0 +1,28 @@
|
||||
# Graph-based pipeline configuration example
|
||||
# This defines a pipeline using the new graph DSL
|
||||
|
||||
[nodes.source]
|
||||
type = "source"
|
||||
source = "headlines"
|
||||
|
||||
[nodes.camera]
|
||||
type = "camera"
|
||||
mode = "scroll"
|
||||
speed = 1.0
|
||||
|
||||
[nodes.noise]
|
||||
type = "effect"
|
||||
effect = "noise"
|
||||
intensity = 0.3
|
||||
|
||||
[nodes.fade]
|
||||
type = "effect"
|
||||
effect = "fade"
|
||||
intensity = 0.8
|
||||
|
||||
[nodes.display]
|
||||
type = "display"
|
||||
backend = "null"
|
||||
|
||||
[connections]
|
||||
list = ["source -> camera -> noise -> fade -> display"]
|
||||
Reference in New Issue
Block a user