Re: [Tools-discuss] Standalone iddiff?

Chris Morrow <morrowc@ops-netman.net> Mon, 04 March 2024 16:57 UTC

Return-Path: <morrowc@ops-netman.net>
X-Original-To: tools-discuss@ietfa.amsl.com
Delivered-To: tools-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AF261C14F6E3 for <tools-discuss@ietfa.amsl.com>; Mon, 4 Mar 2024 08:57:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.106
X-Spam-Level:
X-Spam-Status: No, score=-7.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, 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
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (4096-bit key) header.d=ops-netman.net
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 vp6wSxUVlE2K for <tools-discuss@ietfa.amsl.com>; Mon, 4 Mar 2024 08:57:24 -0800 (PST)
Received: from relay.ops-netman.net (relay.ops-netman.net [192.110.255.59]) (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 C0872C1782B5 for <tools-discuss@ietf.org>; Mon, 4 Mar 2024 08:57:12 -0800 (PST)
Received: from mail.ops-netman.net (mailserver.ops-netman.net [199.168.90.119]) (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 relay.ops-netman.net (Postfix) with ESMTPS id 0495E3C2232; Mon, 4 Mar 2024 16:57:10 +0000 (UTC)
Received: from mailserver.ops-netman.net.ops-netman.net (mailserver.ops-netman.net [199.168.90.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.ops-netman.net (Postfix) with ESMTPSA id A656B240; Mon, 4 Mar 2024 16:57:09 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ops-netman.net; s=2021; t=1709571429; bh=5f7HmrS3nogqoobL3GEuxBCS2nSTtbsPdrTh4ZRZLQA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bw4plbwt+PeT9xQx7eSyoKpmwFKh9B8lhgx6MPow1z2zqylJuyy9Bv+QqKomEwjEq OJUHjCLXYtz69vF3T/vRsHw7THN+FRYtQ+mnED1YPO6gj/qk5tUjnZk630XLpkuFe5 qwRehrxrgBhr8mQvfobLkPKVYZZMgTFAEoKQCr2oR1MDGqESAdLCFeBenDu4mDEKgp 8S56tmeHZyUPTanjEGde/e7QICuf3F0bl3oGBqRBzTDRn0UIpuPQhz3D9nrOfWQm12 LV+O5VM9GRWIYtS3K/SMNISt/GYux888XTOxYcOyNblWdsV8qyoS8bcK6OFpexvJyq PU4ncDoBMvoLUIFjMjoRb896+8GiEzJ0QppEcMUJebEhT0wIClwj1Ylpptek+OxMBX I+kqlkNA8kuivBLomTNzCB2NSO1Wi3r+fLYGdJJzLgRQJ9xYli+WAO3nRRbA28Z9lE O8vyAW9PWvSNgkITPw2g+9T05qZRjqJJ1cwDLg51zw21/Iok5gtKVDoIOr7NpXhouN WNkUm1DEIlJONcm9IDkwE3Lm6CAWdep9P52LpZTsAtNGeWHzZrlPsWr8I9+EA/5a5L yJULqprY3mCMKJWLQwCf2slD+x+AmQkI3kXumZlUfNDeFY3UH7MwY3GUtdMK+D7g6g +LQQAg9RFx4PmgcVs/aZsH/s=
Date: Mon, 04 Mar 2024 16:57:09 +0000
Message-ID: <87plwakk9m.wl-morrowc@ops-netman.net>
From: Chris Morrow <morrowc@ops-netman.net>
To: Chris Morrow <morrowc=40ops-netman.net@dmarc.ietf.org>
Cc: Paul Hoffman <phoffman@proper.com>, Tools Team Discussion <tools-discuss@ietf.org>
In-Reply-To: <87r0gqkkfn.wl-morrowc@ops-netman.net>
References: <FEA0AADB-89C3-4B5F-9470-A6579D9A4680@proper.com> <87r0gqkkfn.wl-morrowc@ops-netman.net>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/25.2 Mule/6.0 (HANACHIRUSATO)
Organization: Operations Network Management, Ltd.
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: text/plain; charset="US-ASCII"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tools-discuss/GzwPY8dY8-MliRZg7j0GKGaxKZ8>
Subject: Re: [Tools-discuss] Standalone iddiff?
X-BeenThere: tools-discuss@ietf.org
X-Mailman-Version: 2.1.39
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: Mon, 04 Mar 2024 16:57:29 -0000

On Mon, 04 Mar 2024 16:53:32 +0000,
Chris Morrow <morrowc=40ops-netman.net@dmarc.ietf.org> wrote:
> 
> On Mon, 04 Mar 2024 16:33:47 +0000,
> Paul Hoffman <phoffman@proper.com> wrote:
> > 
> > Greetings. I see https://author-tools.ietf.org/iddiff, but I don't
> > see a way to run it from a CLI on my laptop. Is the source easily
> > available? I looked at https://github.com/ietf-tools/author-tools,
> > but didn't see diffing.
> 
> quickly searching in the repo got me some javascript/stuff that looks
> like it wants to eventually run an /api/iddiff api request...
> 
> That's this:
> 
>   https://github.com/ietf-tools/author-tools/blob/eb8fbbaf9b14cf59fd34ede21b9d324d5fb322c8/at/api.py#L282
> 
> I think... that seems to do a bunch of quality checking on inputs then use this(get_id_diff):
> 
>   https://github.com/ietf-tools/author-tools/blob/eb8fbbaf9b14cf59fd34ede21b9d324d5fb322c8/at/api.py#L10
> 
> to do the meat of the matters. The source for that is:
> 
>   https://github.com/ietf-tools/author-tools/blob/eb8fbbaf9b14cf59fd34ede21b9d324d5fb322c8/at/utils/iddiff.py#L16
> 
> I imagine you could pull out enough of the guts there to build a simple cli tool.

Err, so... that really just shells out to run some cli tool, it ALSO has this wierdness:

https://github.com/ietf-tools/author-tools/blob/eb8fbbaf9b14cf59fd34ede21b9d324d5fb322c8/at/utils/iddiff.py#L48-L56

which is essentially:
  "Do the shell command, if that times out, do it again recursively"
  (note there are no limitations on that recursion, yikes!)