[Tools-discuss] question on datatracker access to particular I-D version

Tony Hansen <tony@att.com> Sun, 19 July 2015 10:50 UTC

Return-Path: <tony@att.com>
X-Original-To: tools-discuss@ietfa.amsl.com
Delivered-To: tools-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 950651AC414 for <tools-discuss@ietfa.amsl.com>; Sun, 19 Jul 2015 03:50:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.311
X-Spam-Level:
X-Spam-Status: No, score=-2.311 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EqIMPT_AwlMu for <tools-discuss@ietfa.amsl.com>; Sun, 19 Jul 2015 03:50:25 -0700 (PDT)
Received: from nbfkord-smmo06.seg.att.com (nbfkord-smmo06.seg.att.com [209.65.160.94]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0BB651AC413 for <tools-discuss@ietf.org>; Sun, 19 Jul 2015 03:50:24 -0700 (PDT)
Received: from unknown [144.160.229.23] (EHLO alpi154.enaf.aldc.att.com) by nbfkord-smmo06.seg.att.com(mxl_mta-7.2.4-5) over TLS secured channel with ESMTP id de08ba55.0.1286575.00-2191.3618041.nbfkord-smmo06.seg.att.com (envelope-from <tony@att.com>); Sun, 19 Jul 2015 10:50:25 +0000 (UTC)
X-MXL-Hash: 55ab80f17b5132ca-2cf02c9457235de753d82a70f10a47cf77b7dfc0
Received: from enaf.aldc.att.com (localhost [127.0.0.1]) by alpi154.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id t6JAoLVm029995 for <tools-discuss@ietf.org>; Sun, 19 Jul 2015 06:50:21 -0400
Received: from alpi133.aldc.att.com (alpi133.aldc.att.com [130.8.217.3]) by alpi154.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id t6JAoCCX029933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for <tools-discuss@ietf.org>; Sun, 19 Jul 2015 06:50:16 -0400
Received: from alpi153.aldc.att.com (alpi153.aldc.att.com [130.8.42.31]) by alpi133.aldc.att.com (RSA Interceptor) for <tools-discuss@ietf.org>; Sun, 19 Jul 2015 10:50:07 GMT
Received: from aldc.att.com (localhost [127.0.0.1]) by alpi153.aldc.att.com (8.14.5/8.14.5) with ESMTP id t6JAo752015989 for <tools-discuss@ietf.org>; Sun, 19 Jul 2015 06:50:07 -0400
Received: from dns.maillennium.att.com (maillennium.att.com [135.25.114.99]) by alpi153.aldc.att.com (8.14.5/8.14.5) with ESMTP id t6JAnw01015364 for <tools-discuss@ietf.org>; Sun, 19 Jul 2015 06:49:58 -0400
Received: from tonys-macbook-pro.local (unknown[135.110.240.119](untrusted sender)) by maillennium.att.com (mailgw1) with ESMTP id <20150719104954gw1000cepee>; Sun, 19 Jul 2015 10:49:56 +0000
X-Originating-IP: [135.110.240.119]
Message-ID: <55AB80CF.2030307@att.com>
Date: Sun, 19 Jul 2015 06:49:51 -0400
From: Tony Hansen <tony@att.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: Tools Team Discussion <tools-discuss@ietf.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RSA-Inspected: yes
X-RSA-Classifications: public
X-AnalysisOut: [v=2.0 cv=JfoLWz2V c=1 sm=1 a=VXHOiMMwGAwA+y4G3/O+aw==:17 a]
X-AnalysisOut: [=zQP7CpKOAAAA:8 a=tHvJy1wsfNMA:10 a=Q0LpwwsZAhIA:10 a=zOBT]
X-AnalysisOut: [XjUuO1YA:10 a=48vgC7mUAAAA:8 a=slMX1fRx2l5zcr4q5JkA:9 a=QE]
X-AnalysisOut: [XdDO2ut3YA:10]
X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2014051901)]
X-MAIL-FROM: <tony@att.com>
X-SOURCE-IP: [144.160.229.23]
Archived-At: <http://mailarchive.ietf.org/arch/msg/tools-discuss/cbKOEhMnqoTH2Ph6VxPbpo2xkNU>
Subject: [Tools-discuss] question on datatracker access to particular I-D version
X-BeenThere: tools-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF Tools Discussion <tools-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tools-discuss/>
List-Post: <mailto:tools-discuss@ietf.org>
List-Help: <mailto:tools-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Jul 2015 10:50:27 -0000

I'm working on generating bibxml3 (bibxml for internet drafts) via
django and the datatracker database.

Is there a way to pull up a >particular version< of an I-D on the
datatracker via the URL?

That is, URLs such as

http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf-02
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf?version=02
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf-02.txt
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf/02

as opposed to

http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf

which pulls up the final document and lets you get at the earlier
versions after additional clicks.


    Tony Hansen

Full discussion:

I'm also looking at the possibility of making an update to remove the
<format> entries and replacing them with a target on the <reference>
element.

I had *thought* that I could do this using a reference to the
datatracker copy of the internet drafts. But there is an issue.

For each internet draft, e.g. draft-ietf-example-foo-*, there are at
least two entries:

    reference.I-D.draft-ietf-example-foo-00.xml       
    reference.I-D.ietf-example-foo.xml

That is, there is a specific entry for each version of the document with
the complete name of the document and version, PLUS a single entry for
the document >series< that does not have any version number or the
leading "draft-" prefix. This last entry is updated whenever a new
version is created

Picking a draft at random, and doing an ls -l on its variants shows this:

-r--r--r-- 1 tony tony      986 Jun 26  2014
reference.I-D.draft-hansen-rfc-use-of-pdf-00.xml
-r--r--r-- 1 tony tony     1096 Jul 21  2014
reference.I-D.draft-hansen-rfc-use-of-pdf-01.xml
-r--r--r-- 1 tony tony     1089 Jul 22  2014
reference.I-D.draft-hansen-rfc-use-of-pdf-02.xml
-r--r--r-- 1 tony tony      982 Oct 27  2014
reference.I-D.draft-hansen-rfc-use-of-pdf-03.xml
-r--r--r-- 1 tony tony      982 Jan 23 00:00
reference.I-D.draft-hansen-rfc-use-of-pdf-04.xml
-r--r--r-- 1 tony tony      983 Feb 17 00:00
reference.I-D.draft-hansen-rfc-use-of-pdf-05.xml
-r--r--r-- 1 tony tony     1089 Mar  9 00:00
reference.I-D.draft-hansen-rfc-use-of-pdf-06.xml
-r--r--r-- 1 tony tony     1090 Mar 25 00:00
reference.I-D.draft-hansen-rfc-use-of-pdf-07.xml

-r--r--r-- 1 tony tony     1090 Mar 25 00:00
reference.I-D.hansen-rfc-use-of-pdf.xml


Currently the document series entry is always identical to the
largest-numbered entry.


The relevant bits of one of these files (-02) for this discussion are:

<reference anchor='I-D.hansen-rfc-use-of-pdf'>
    <seriesInfo name='Internet-Draft'
value='draft-hansen-rfc-use-of-pdf-02' />
    <format type='TXT'
target='http://www.ietf.org/internet-drafts/draft-hansen-rfc-use-of-pdf-02.txt'
/>
</reference>

I could certainly do a direct move of the existing target so that we get

<reference anchor='I-D.hansen-rfc-use-of-pdf'
target='http://www.ietf.org/internet-drafts/draft-hansen-rfc-use-of-pdf-02.txt'>
    <seriesInfo name='Internet-Draft'
value='draft-hansen-rfc-use-of-pdf-02' />
</reference>

But that doesn't use the datatracker like I wanted.

I could make the document series entry different from the
individual-document entry, as in:

<reference anchor='I-D.hansen-rfc-use-of-pdf'
target='http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf'>
    <seriesInfo name='Internet-Draft'
value='draft-hansen-rfc-use-of-pdf-07' />
</reference>



But I don't know of any way to pull up a particular version of the I-D
on the datatracker via the command line. That is, URLs such as

http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf-02
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf-02.txt
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf/02

So, unless I can find a way to reference the individual version of a
document on the datatracker, the individual-document entries would need
to continue using the www.ietf.org/internet-drafts URL instead of a
datatracker URL.