def links_line(context, rels, extra=None):
    """String with one link relation formatted according to RFC6690.

    Example line:

    <http://arxiv.example.net/timemap/http://a.example.org>
      ; rel="self";type="application/link-format"
      ; from="Tue, 20 Jun 2000 18:02:59 GMT"
      ; until="Wed, 09 Apr 2008 20:30:51 GMT"

    (and multiple lines are separated with commas)

    Ref: https://tools.ietf.org/html/rfc6690
    """
    s = '<' + context + '>'
    s += '\n  ;rel="' + ' '.join(rels) + '"'
    if extra is not None:
        for k, v in sorted(extra.items()):
            s += '\n  ;' + k + '="' + v + '"'
    return s
