Re: [rfc-i] getting SVG of RFC diagrams

Carsten Bormann <cabo@tzi.org> Thu, 23 November 2023 11:53 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: rfc-interest@ietfa.amsl.com
Delivered-To: rfc-interest@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3830AC1522AF for <rfc-interest@ietfa.amsl.com>; Thu, 23 Nov 2023 03:53:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.906
X-Spam-Level:
X-Spam-Status: No, score=-1.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pn-p_T6cGZDd for <rfc-interest@ietfa.amsl.com>; Thu, 23 Nov 2023 03:53:21 -0800 (PST)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 47CAEC1519B7 for <rfc-interest@rfc-editor.org>; Thu, 23 Nov 2023 03:53:19 -0800 (PST)
Received: from [192.168.217.145] (p548dcbf2.dip0.t-ipconnect.de [84.141.203.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4Sbc236P6KzDCbG; Thu, 23 Nov 2023 12:53:15 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <7C81D316-7D04-4941-BEE5-6AE8C96F0DE1@tzi.org>
Date: Thu, 23 Nov 2023 12:53:15 +0100
Cc: rfc-interest@rfc-editor.org
X-Mao-Original-Outgoing-Id: 722433195.317526-cfa3abb27e5b8c4c10f0836a25f52b92
Content-Transfer-Encoding: quoted-printable
Message-Id: <D1F8F86E-80D7-4FC7-B7B5-32648ACB5D65@tzi.org>
References: <310371.1700735021@dyas> <7C81D316-7D04-4941-BEE5-6AE8C96F0DE1@tzi.org>
To: Michael Richardson <mcr+ietf@sandelman.ca>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-interest/ZPuot_M7m1ZcfHzt4Qdsiu4x-rs>
Subject: Re: [rfc-i] getting SVG of RFC diagrams
X-BeenThere: rfc-interest@rfc-editor.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "A list for discussion of the RFC series and RFC Editor functions." <rfc-interest.rfc-editor.org>
List-Unsubscribe: <https://mailman.rfc-editor.org/mailman/options/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rfc-interest/>
List-Post: <mailto:rfc-interest@rfc-editor.org>
List-Help: <mailto:rfc-interest-request@rfc-editor.org?subject=help>
List-Subscribe: <https://mailman.rfc-editor.org/mailman/listinfo/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Nov 2023 11:53:25 -0000

On 2023-11-23, at 12:06, Carsten Bormann <cabo@tzi.org> wrote:
> 
> If you have the XML, I would have said "use `kramdown-rfc-extract-sourcecode -tfiles rfc4711.xml` and look into sourcecode/svg”, but I apparently never tested this…  Will fix.

Fixed in kramdown-rfc version 1.7.3.  As usual, update

  gem update kramdown-rfc

(using any options you used for initially installing kramdown-rfc).

Then you can 

  kramdown-rfc-extract-sourcecode -tfiles rfc4711.xml

and will find the svg files under

  sourcecode/svg

If you have a workable (and non-brittle) idea how to name the SVG files, please tell me (*).

                      .oOo.

Back to on-topic content:

This is really one of the many examples where RFCs include “attachments”, and we should make it easier to get at them.

Grüße, Carsten


(*) RFCs in publication format have an attribute “slugifiedName” (apparently undocumented at https://authors.ietf.org/rfcxml-vocabulary) on an ancestor of that <svg element, but that only is available after prepping, so it is not useful for I-Ds which are in authoring format.