Main method.

def main():
    """Main method."""
    args = parse_cmd_arguments()
    html_file = args.file

    try:
        json.loads(args.add_tags or '{}')
        json.loads(args.exc_tags or '{}')
    except ValueError:
        print('\033[91m' + 'Invalid json string: please provide a valid json '
              'string e.g {}'.format('\'{"img": "data-url"}\'') + '\033[0m')
        sys.exit(1)

    staticfied = staticfy(html_file, args=args).encode('utf-8')
    file_ops(staticfied, args=args)