def rename_list_to_dict(rlist):
    """
    Helper for main to parse args for rename operator.  The args are
    assumed to be a pair of strings separated by a ":".  These are
    parsed into a dict that is returned with the old document key to
    be replaced as the (returned) dict key and the value of the return
    being set as the string defining the new key.

    """
    result = dict()
    for val in rlist:
        pair = val.split(":")
        if len(pair) != 2:
            print("Cannot parse pair defined as ", val)
            print("-r args are expected to be pairs of keys strings with a : separator")
            print("Type dbclean --help for usage details")
            exit(-1)
        result[pair[0]] = pair[1]
    return result