diff --git a/scripts/merge-yaml.js b/scripts/merge-yaml.js index 1940d01..1404e6b 100644 --- a/scripts/merge-yaml.js +++ b/scripts/merge-yaml.js @@ -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(); \ No newline at end of file