15 lines
252 B
Python
Executable File
15 lines
252 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import yaml
|
|
import json
|
|
|
|
data = list(yaml.load_all(sys.stdin))
|
|
files = sys.argv[1:]
|
|
|
|
for i in range(len(data)):
|
|
doc = data[i]
|
|
path = files[i]
|
|
with open(path, 'w') as f:
|
|
json.dump(doc, f, indent=4)
|