def main(arguments=None, config=None):
    """
    Parse arguments for ``idid`` command.

    Pass optional parameter ``arguments`` as either command line
    string or list of options. This is mainly useful for testing.

    ``config`` can be passed in as a path or string to access user defined
    values for important variables manually. YAML only.

    Returns the saved logg string.

    """
    # Parse options, initialize gathered stats
    options = LoggOptions(arguments=arguments).parse()

    # FIXME: pass in only config; set config.journal = options.journal
    if not config:
        config = options.config_file

    logg = Logg(config, options.journal)

    return logg.logg_record(options.logg, options.date)
Parse arguments for ``idid`` command.

    Pass optional parameter ``arguments`` as either command line
    string or list of options. This is mainly useful for testing.

    ``config`` can be passed in as a path or string to access user defined
    values for important variables manually. YAML only.

    Returns the saved logg string.