blob: 2ad8ddc252e0167ae91977c5e05c4702217315fc [file] [log] [blame]
Andrew Geissler17539512019-06-24 15:52:30 -05001#!/usr/bin/python3
2
3# Copyright 2019 IBM Corp.
4
5import yaml
6from argparse import ArgumentParser
7
8if __name__ == '__main__':
9 # A simple program to ensure proper indents of input yaml file
10 parser = ArgumentParser(description="YAML formatter")
11 parser.add_argument('-f', '--file', dest='file_yaml',
12 help='yaml file to format')
13 args = parser.parse_args()
14
15 print(yaml.dump(yaml.load(open(args.file_yaml),
16 Loader=yaml.FullLoader), indent=4))