To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.faqOpen lugnet.faq in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 FAQ / 166
165  |  167
Subject: 
Re: New LUGNET directory structre?
Newsgroups: 
lugnet.faq
Date: 
Wed, 5 May 1999 21:06:16 GMT
Viewed: 
1498 times
  
In lugnet.faq, jsproat@geocities.com (Sproaticus) writes:
The only difference is that there are
more directories than ng's:  All ng's have a corresponding directory but not
necessarily vice-versa...the directories [can] go deeper than the ng's.

Do you have a working list of non-ng directories?

Sort of.  I'll tell ya what, though...I'll give you a bit more than that,
and you can extract whatever you need from it.  How's that sound?

Here's the URL of a script which generates a tab-delimited page (MIME type
text/plain) on-the-fly from the server's data about the groups:

   http://www.lugnet.com/sitemap-raw.cgi

This just does a flat dump of the entire tree.  Columns in the data are:

   1.  URI of the group (URL minus the http://www.lugnet.com prefix)
   2.  Category ID within its parent (null for the root)
   3.  Newsgroup name (null if no associated newsgroup)
   4.  Short category name
   5.  Long category name
   6.  Category/newsgroup charter

Save this page to a file, and then to get a list of non-ng directories,
simply do:

   cat filename | gawk -v FS="\t" '!$3'
or
   cat filename | gawk -v FS="\t" '!$3{print $1}'

Or if you wanted to transmogrify this into a more compact list relating the
URI and the ng names, you could do:

   cat filename | gawk -v FS="\t" -v OFS="\t" '{print $1,$3}'

Or if you wanted just a list of the loc group ng's and their full names:

   cat filename | gawk -v FS="\t" -v OFS="\t" '/^\/loc\//&&$3{print $3,$5}'

etc....

--Todd



Message has 2 Replies:
  Re: New LUGNET directory structre?
 
(...) Todd, I'm shocked! Awk? In a Perl world? :-, Cheers, - jsproat (26 years ago, 5-May-99, to lugnet.faq)
  Re: New LUGNET directory structre?
 
Todd: (...) How do we integrate the translation of the FAQ with this? We need to translate (and store) column four and five to translate the FAQ. Should we generate a file similar to [1] based on your table, and then add the translations to that (...) (26 years ago, 6-May-99, to lugnet.faq)

Message is in Reply To:
  Re: New LUGNET directory structre?
 
(...) Okay, I'll start working with that assumption. (...) Do you have a working list of non-ng directories? (...) I uploaded it to my Web site. (URL) unzip it with directories. This is the raw, unadulterated FAQ source, so it's not very pretty. The (...) (26 years ago, 4-May-99, to lugnet.faq)

21 Messages in This Thread:








Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR