1#!/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))
17