mirror of
https://github.com/jqlang/jq.git
synced 2025-11-16 18:22:22 +03:00
14 lines
430 B
Python
Executable File
14 lines
430 B
Python
Executable File
#!/usr/bin/env python3
|
|
import yaml
|
|
|
|
with open("content/manual/manual.yml") as f:
|
|
manual = yaml.safe_load(f)
|
|
for section in manual.get('sections', []):
|
|
for entry in section.get('entries', []):
|
|
for example in entry.get('examples', []):
|
|
print(example.get('program', '').replace('\n', ' '))
|
|
print(example.get('input', ''))
|
|
for s in example.get('output', []):
|
|
print(s)
|
|
print('')
|