Skip to content

Commit eeacf76

Browse files
authored
🔧 config.ini / JSON dump by @section (MarlinFirmware#26556)
1 parent 738584d commit eeacf76

File tree

2 files changed

+278
-118
lines changed

2 files changed

+278
-118
lines changed

buildroot/share/PlatformIO/scripts/schema.py

+20-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,26 @@ def load_boards():
8080
return ''
8181

8282
#
83-
# Extract a schema from the current configuration files
83+
# Extract the current configuration files in the form of a structured schema.
84+
# Contains the full schema for the configuration files, not just the enabled options,
85+
# Contains the current values of the options, not just data structure, so "schema" is a slight misnomer.
86+
#
87+
# The returned object is a nested dictionary with the following indexing:
88+
#
89+
# - schema[filekey][section][define_name] = define_info
90+
#
91+
# Where the define_info contains the following keyed fields:
92+
# - section = The @section the define is in
93+
# - name = The name of the define
94+
# - enabled = True if the define is enabled (not commented out)
95+
# - line = The line number of the define
96+
# - sid = A serial ID for the define
97+
# - value = The value of the define, if it has one
98+
# - type = The type of the define, if it has one
99+
# - requires = The conditions that must be met for the define to be enabled
100+
# - comment = The comment for the define, if it has one
101+
# - units = The units for the define, if it has one
102+
# - options = The options for the define, if it has one
84103
#
85104
def extract():
86105
# Load board names from boards.h

0 commit comments

Comments
 (0)