def kwargs_to_glesp_args(**kwargs):
    """
    convert dict of kwargs to format '-name' 'value'
    if value is None --- to '-name' only
    """
    res = []
    for k, v in kwargs.items():
        if v is not None:
            ext = ['-' + k, v]
        else:
            ext = ['-' + k]
        res.extend(ext)
    return res
