🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #88342

Re: Usenet map

#88342
From: Grant Taylor
Date: Wed, 08 Apr 2020 00:06
35 lines
2309 bytes
On 4/7/20 5:49 PM, Grant Taylor wrote:
> I took the Path: headers from my data source (10,000 articles from a 
> newsgroup), derived connections between the upstream and downstream 
> hosts, shift, and repeat.

I hacked together a shell script that read Path: header lines from 
STDIN, looping across each header.

Each path header was split on the bang, and walked posting host to my 
receiving host, looping across each host.

    awk -F\! '{for (i=NF; i>1; i--)printf("%s ",$i); print $1; }'

This allowed me to take action on each host in each path entry.

Since I was starting with the posting / upstream host, I was able to 
iterate through the hosts in the path and deduce the upstream to 
downstream relation.  This directly translated to "$upstream -> 
$downstream" entries for dot to work with.

There was a little bit of clean up work, like priming when I don't have 
both upstream and downstream, as well as some things like not-for-mail / 
mail2news, etc.

I did my node to organizational clean up with sed with things like this 
the following before running loops across them:

s/fx01.iad.POSTED!/Google!/
s/peer03.ams1!/Google!/



-- 
Grant. . . .
unix || die
Technical Details
Message-ID: <r6j4hi$qlc$1@tncsrv09.home.tnetconsulting.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <r6ietg$2ce7$1@news.usenet.ee> <r6j3if$2i6$1@tncsrv09.home.tnetconsulting.net>

Show Full Headers
Complete Article Headers
Message-ID: <r6j4hi$qlc$1@tncsrv09.home.tnetconsulting.net>
Subject: Re: Usenet map
Date: Tue, 7 Apr 2020 18:06:13 -0600
From: Grant Taylor <gtaylor@tnetconsulting.net>
References: <r6ietg$2ce7$1@news.usenet.ee> <r6j3if$2i6$1@tncsrv09.home.tnetconsulting.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp,news.misc
Organization: TNet Consulting
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 8 Apr 2020 00:06:10 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251"; logging-data="27308"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0
In-Reply-To: <r6j3if$2i6$1@tncsrv09.home.tnetconsulting.net>
Content-Language: en-US
Lines: 34