summaryrefslogtreecommitdiffstats
path: root/docs/build_mantests.py
blob: 40f0dccf09bc7f3103bb6326ebf0f93e471eb46e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python3
import yaml

with open("content/manual/manual.yml") as f:
  manual = yaml.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('')