Re: [xml2rfc] sourcecode copy to clipboard

Carsten Bormann <cabo@tzi.org> Mon, 03 July 2023 16:46 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: xml2rfc@ietfa.amsl.com
Delivered-To: xml2rfc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D2597C151539 for <xml2rfc@ietfa.amsl.com>; Mon, 3 Jul 2023 09:46:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.888
X-Spam-Level:
X-Spam-Status: No, score=-1.888 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01] 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 uudS7qMQtwSO for <xml2rfc@ietfa.amsl.com>; Mon, 3 Jul 2023 09:45:55 -0700 (PDT)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [134.102.50.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 8077AC14F747 for <xml2rfc@ietf.org>; Mon, 3 Jul 2023 09:45:54 -0700 (PDT)
Received: from client-0227.vpn.uni-bremen.de (client-0227.vpn.uni-bremen.de [134.102.107.227]) (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 4QvsHh4DpFzDCdl; Mon, 3 Jul 2023 18:45:52 +0200 (CEST)
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: <e91825a2-7191-2301-bd8f-532814763696@htt-consult.com>
Date: Mon, 03 Jul 2023 18:45:52 +0200
Cc: "xml2rfc@ietf.org" <xml2rfc@ietf.org>
X-Mao-Original-Outgoing-Id: 710095552.148955-70b0ad7014b7a64e921f640b2c7e3faa
Content-Transfer-Encoding: quoted-printable
Message-Id: <005C6FD4-06B1-4978-A7F5-4DD2C6020B32@tzi.org>
References: <e91825a2-7191-2301-bd8f-532814763696@htt-consult.com>
To: Robert Moskowitz <rgm@htt-consult.com>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc/O37nsdeHtPWDBjlOYk0pRhtWwUY>
Subject: Re: [xml2rfc] sourcecode copy to clipboard
X-BeenThere: xml2rfc@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: XML2RFC discussion list <xml2rfc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xml2rfc/>
List-Post: <mailto:xml2rfc@ietf.org>
List-Help: <mailto:xml2rfc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Jul 2023 16:46:00 -0000

On 2023-07-03, at 14:26, Robert Moskowitz <rgm@htt-consult.com> wrote:
> 
> I see that the name attribute is not used by xml2rfc, but there for other processes that might like to use it.
> 
> What I am looking for right now is a way to copy the source code at least to the clipboard.

Can’t help with clipboard, but can extract sourcecode in a structured way: Try kramdown-rfc-extract-sourcecode.

Example:

$ kramdown-rfc-extract-sourcecode -tfiles draft-ietf-cbor-edn-literals.xml

Creates a directory `sourcecode` (you can give an alternative name), which contains sourcecode files sorted by type and, then, by name given (unnamed_001 etc. if no name given).

(Part of kramdown-rfc, obviously.)

Grüße, Carsten