Adjust merge-yaml script to output owlboard style yaml
This commit is contained in:
parent
cf52b236cf
commit
f411368e80
@ -32,10 +32,23 @@ function sortAndMergeYAMLFiles() {
|
||||
})
|
||||
|
||||
const mergedYaml = yaml.stringify(mergedData);
|
||||
console.log(mergedYaml)
|
||||
|
||||
// Construct the output string
|
||||
let outputString = "pis:\n";
|
||||
mergedData.forEach(item => {
|
||||
outputString += ` - code: "${item.code}"\n`;
|
||||
outputString += ` stops: [${item.stops.map(stop => `"${stop}"`).join(', ')}]\n`;
|
||||
});
|
||||
|
||||
console.log(outputString)
|
||||
} catch(err) {
|
||||
console.error('Error merging YAML:', err)
|
||||
}
|
||||
}
|
||||
|
||||
function yamlWriteInNiceFormat(yaml) {
|
||||
output = "pis:\n"
|
||||
|
||||
}
|
||||
|
||||
sortAndMergeYAMLFiles();
|
Loading…
Reference in New Issue
Block a user