Re: [xml2rfc-dev] Script to generate RFC reference including abstract?

Martin Thomson <mt@lowentropy.net> Mon, 25 January 2021 06:59 UTC

Return-Path: <mt@lowentropy.net>
X-Original-To: xml2rfc-dev@ietfa.amsl.com
Delivered-To: xml2rfc-dev@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 720E53A0B02 for <xml2rfc-dev@ietfa.amsl.com>; Sun, 24 Jan 2021 22:59:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.219
X-Spam-Level:
X-Spam-Status: No, score=-0.219 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=hEAUdPKb; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=AEp1/6wr
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 T1n_6J2Zqv2f for <xml2rfc-dev@ietfa.amsl.com>; Sun, 24 Jan 2021 22:59:41 -0800 (PST)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 79CB33A0B01 for <xml2rfc-dev@ietf.org>; Sun, 24 Jan 2021 22:59:41 -0800 (PST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B35535C00D9 for <xml2rfc-dev@ietf.org>; Mon, 25 Jan 2021 01:59:40 -0500 (EST)
Received: from imap10 ([10.202.2.60]) by compute1.internal (MEProxy); Mon, 25 Jan 2021 01:59:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm1; bh=fJ4vjthpnmTwTX6WHTdvjKxHgBrlNhg iN8vavSq4FUk=; b=hEAUdPKbURoixJAUlKdtea5N2XNAsnqO1u46dw6h5WXx7zO Tp4PmCNFp+8Y0E4xJ1V8a8iwL+DiU3IeaX6aVZQBq0I2NewHXP5Q1ZMBkO2q1g3k Eo69Fo4Y3CdJi5toy3kbSUslbrIAPjxvvjIe24DtPpReCA0p7sxy1R4ekX3PUYQU 4kTSXIOV25TSZdtiW6f+FnB7nOOPaA9KQZn1vautLJRaLPOmXdIgg20UMRvUqK3w ybwoe/LZrOoIfmongVs8B5skVyUUPAg3+dxwpzEAPC+aok5ioPSimlA+OqoQTzbX 2NY3wn84WtEZViaVSz1cEepcc2t+w+Vow4oekuQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=fJ4vjt hpnmTwTX6WHTdvjKxHgBrlNhgiN8vavSq4FUk=; b=AEp1/6wr7D1xOwCNohdBnk 34QUD5a9abThU63OrW7/bwnO1arcNk1ZWDiuuIfxKPHyE89bRARD5n+ImVYpTiX/ JnDWzLZvQUw+oJZmg/xZgIkN6fC0Rx2SC4icaxQ6RoFEJd7B8/lFJOVOCZD7bTGU wyuRMUkipbC5eS6DEubK8b2g1pkqB+J/Y1DAok+Cr7j5a7gfGabs0IBhAQb2VgMM tpk02WQhq6TnyPvb506YTKg5P9gGdnpjKgK6ULFIejPxX4VZnZ7gU8BDpbnQbzJu oaNDb28JDU7FxuC0/z40tH7MPJD4OStEfta8HTlocPh7n7Ta7KkN72RZpenEs5Zw ==
X-ME-Sender: <xms:W2wOYOCvXqA_iXsDcANR3JfD0bE7tajhIKw7BUnkGtiUIRSjEMsl_A> <xme:W2wOYIg-ygSlXocUsFNoBJnm_C6xK8TKRg_xfjpjfdbMDeVvzRY7ZDeZPQcHUZOT8 mLGGoTxstAMEG1Byt4>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddvgddutddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderreejnecuhfhrohhmpedfofgrrhhtihhnucfvhhhomhhsohhnfdcuoehmtheslhho figvnhhtrhhophihrdhnvghtqeenucggtffrrghtthgvrhhnpedttdeghffhleefvdduud fgvdeukeeftdeugfdukeevgeekffejteetfeegledthfenucffohhmrghinhepihgvthhf rdhorhhgpdhrfhgtqdgvughithhorhdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmtheslhhofigvnhhtrhhophihrdhnvght
X-ME-Proxy: <xmx:W2wOYBkoC0tJ6W3DF3MsYeZuQ8kief5SURzvmdPZrUVPG5512uXlPw> <xmx:W2wOYMz0teOZ5eI-Gwa2FGDDULpnRv4TgXoBrL5Fe1nOyXlEib6t7g> <xmx:W2wOYDRHvD4vQVnkrRITUK4CqLHYSqX_kTH1sy_Rrh_FUoB6Uux5Uw> <xmx:XGwOYKc2IZPdcsxcmz9mNiwR8xCepMptUTKrmT8kWAyy9zUYy-A0Eg>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id A5E444E0063; Mon, 25 Jan 2021 01:59:39 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-78-g36b56e88ef-fm-20210120.001-g36b56e88
Mime-Version: 1.0
Message-Id: <cc1bf4ec-3b5d-4b91-98de-1ee4e4fe0185@www.fastmail.com>
In-Reply-To: <CAA=duU2nj0G2H9v3Fft5iBAA8bxTX0zNgZsevMpojZY3TZQ6dg@mail.gmail.com>
References: <CAA=duU2nj0G2H9v3Fft5iBAA8bxTX0zNgZsevMpojZY3TZQ6dg@mail.gmail.com>
Date: Mon, 25 Jan 2021 17:59:19 +1100
From: Martin Thomson <mt@lowentropy.net>
To: xml2rfc-dev@ietf.org
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc-dev/A-57Kq8p2LMGDeB1nFsCV-C1EoY>
Subject: Re: [xml2rfc-dev] Script to generate RFC reference including abstract?
X-BeenThere: xml2rfc-dev@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion about particulars of xml2rfc V3 design, development and code." <xml2rfc-dev.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xml2rfc-dev>, <mailto:xml2rfc-dev-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xml2rfc-dev/>
List-Post: <mailto:xml2rfc-dev@ietf.org>
List-Help: <mailto:xml2rfc-dev-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xml2rfc-dev>, <mailto:xml2rfc-dev-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Jan 2021 06:59:43 -0000

To get the reference:
curl -sSf https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml

To get just the abstract:
curl -sSf https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml | \
  xmllint --xpath '//abstract/t/text()' /dev/stdin

On Mon, Jan 25, 2021, at 04:03, Andrew G. Malis wrote:
> Just to save myself a bit of work if this already exists ....
> 
> Have any of you written a script when, given a list of RFC numbers, 
> will generate an xml2rfc-ish reference and pull out the abstract for 
> each RFC? Something like, when given "8660", will produce:
> 
>    [RFC8660]  Bashandy, A., Ed., Filsfils, C., Ed., Previdi, S.,
>               Decraene, B., Litkowski, S., and R. Shakir, "Segment
>               Routing with the MPLS Data Plane", RFC 8660,
>               DOI 10.17487/RFC8660, December 2019,
>               <https://www.rfc-editor.org/info/rfc8660>.
> 
>    Segment Routing (SR) leverages the source-routing paradigm.  A node
>    steers a packet through a controlled set of instructions, called
>    segments, by prepending the packet with an SR header.  In the MPLS
>    data plane, the SR header is instantiated through a label stack.
>    This document specifies the forwarding behavior to allow
>    instantiating SR over the MPLS data plane (SR-MPLS).
> 
> Thanks,
> Andy
> 
> _______________________________________________
> xml2rfc-dev mailing list
> xml2rfc-dev@ietf.org
> https://www.ietf.org/mailman/listinfo/xml2rfc-dev
>