def str2link(s, directory, title=''):
    """ Used by the --html options, this takes a string and makes it into
    an html <a href...> link without a closing </a>.
    """
    if directory == '':
        return ''
    else:
        if title:
            return '<a href="%s/%s" title="%s">' % (directory, s, title)
        else:
            return '<a href="%s/%s">' % (directory, s)