def arguments2options(args):
    """
    Convert CLI arguments into a dict
    
    - Warns of Pandoc options that do not start with '--' (we only support --opt=val and --flag)
    - TODO: Add support for -O val
    """
    assert not isinstance(args, str)
    options = {}
    for arg in args:
        if not arg.startswith('--'):
            print(f'WARNING: option {arg} does not start with "--"; ignored')
            continue
        arg = arg[2:].split('=')
        options[arg[0]] = arg[1] if len(arg) == 2 else True
    return options
