Article View: news.software.readers
Article #171744Re: Google Groups Script
From: Alan Connor
Date: Sat, 20 Aug 2005 06:20
Date: Sat, 20 Aug 2005 06:20
98 lines
4848 bytes
4848 bytes
On news.software.readers, in <slrndgdg1i.bge.ohmster@ohmster.com>, "The Ohmster" wrote: > On 2005-08-19, Alan Connor <zzzzzz@xxx.invalid> wrote: > >> ##!/bin/bash >> # >> ## pipe the article to this script >> # >> ## You need GNU date for this. >> # >> ## It will reject From lines that are way out of the norm, >> ##+ such as those with too many names (more than 4) and + >> ##non-us-ascii characters. It recognizes these formats + as >> ##valid: > > # > >> Remove the leftmost column of "#" >> >> AC > > Alan, > > What does one use this script for? I would pipe an individual > article to this script and what is it for? Does it like find > all posts by the individual from google, sort of like a > "troll-o-meter"? Is that it? This looks like a really cool > script but for the life of me, I cannot understand what it is > used for. Note: I don't know scripting language so I cannot > just peruse this script and understand exactly what it does. > Hi E/Ister :-) You're basically on track. I have it set up to run from a slrn macro. If I'm looking at headers or a full post, or just have the cursor on the entry in the menu, and I'm online, I hit "_" and it extracts the name from the From header (the part that you would see in your menu) and and hits google groups and brings back what you would get if you went to http://groups.google.com/advanced_group_search, entered the name, limited the search to the last year, and chose 10-100 post to be returned. When I exit the browser (which can be textmode and therefore very fast on even a dialup) I'm back where I was in slrn. It's not a script that is tolerant of people who fuck around withtheir From header. If their header baffles the script, it exits and they are history. Very rarely do such people have anything tosay that I care to read. The next step will be to extend the script to convert the webpage to text and parse out the information I want and summarize it: How many posts, what groups, and the dates. (all for the first 100 hits). Get it down to a screeful. Not hard. I have the script up on my website, in the slrn dir, as well as instructions on how to write the kind of slrn macros needed for this. All you need to do is call the script anything you want, make it executable, put it in /usr/local/bin as root, do chmod o+rx on it, and put that name in the macro instead of "less" (for example), and choose a character to call it with. Like I said above, I chose "_" because slrn doesn't use it for anything. Be real careful about the newlines when you copy the script. That URL is all one line, no spaces, for example. To get rid of the leftmost column of "#", type this is vi, from command mode: :%s/^#//<enter> (When I'm in vi, "_" runs a vi macro that lets me pick a sig from my ~/sigs directory and prints it under the cursor. It actually just picks a file, but most of them are sigs: In command mode I hit "_" then enter "k" and I get the sig below. "k" is the name of the file...I could have a macro that brought up a menu to select a sig from, but mnemonics work for me. "k" for "kook" :-) Gotta learn sh/bash, Ohmster. You'll be a newbie until you do. comp.unix.shell I _REALLY_ recommend getting "Learning the bash Shell" 2nd Edition, OREILLY. Get it used from Amazon. If you don't have Rute, get it. Run this script in your home directory: wget -O - http://rute.2038bug.com/rute.html.tar.bz2 | tar -xvvjf - Study the hell out of the first 9 chapters or so, posting questions to cus and alt.os.linux and comp.unix.questions and comp.os.linux.misc. AC -- http://home.earthlink.net/~alanconnor/ http://angel.1jh.com./nanae/kooks/alanconnor.html
Technical Details
Message-ID:
<dZzNe.8684$WD.7361@newsread1.news.pas.earthlink.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!65807237!not-for-mailReferences:
<3kjNe.8391$WD.3906@newsread1.news.pas.earthlink.net> <slrndgdg1i.bge.ohmster@ohmster.com>Show Full Headers
Complete Article Headers
Message-ID: <dZzNe.8684$WD.7361@newsread1.news.pas.earthlink.net> Subject: Re: Google Groups Script Date: Sat, 20 Aug 2005 06:20:57 GMT From: Alan Connor <zzzzzz@xxx.invalid> References: <3kjNe.8391$WD.3906@newsread1.news.pas.earthlink.net> <slrndgdg1i.bge.ohmster@ohmster.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!65807237!not-for-mail Newsgroups: news.software.readers User-Agent: slrn/0.9.8.1 (Debian) Lines: 98 NNTP-Posting-Host: 4.242.3.161 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1124518857 4.242.3.161 (Fri, NNTP-Posting-Date: Fri, 19 Aug 2005 23:20:57 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net