Thread View: news.software.readers
11 messages
11 total messages
Started by Alan Connor
Fri, 19 Aug 2005 11:24
Google Groups Script
Author: Alan Connor
Date: Fri, 19 Aug 2005 11:24
Date: Fri, 19 Aug 2005 11:24
69 lines
2823 bytes
2823 bytes
##!/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:
#
## foo [foo] [foo] [foo] <foo@foo.foo>
## foo@foo.foo (foo [foo] [foo] [foo])
#
## It searches only the name, not the email address,
##+ for all groups, in the last year, and returns
##+ the last 10 posts. Change Posts= below up to 100
##+ posts, google's upper limit.
#
#
## put your favorite browser here
#Browser=
#
#alias=$(sed -n '/^From: /s/\(From: \)\(.*\)/\2/p')
#
#case "$alias" in
#
#*\<*@*.*\> )
#alias2=$(echo "$alias" | sed -n 's/^\(.*\)\( <.*>\)/\1/p')
#echo "$alias2" ;;
#*@*.*\(*\) )
#alias2=$(echo "$alias" | sed -n 's/^\(.*(\)\(.*\)\()\)/\2/p')
#echo "$alias2" ;;
#* ) echo "header screwed up - exiting" ; sleep 2 ; exit 1 ;;
#esac
#
#set - $alias2
#
#if [ $# -eq 1 ] ; then
#alias3="${1}"
#elif [ $# -eq 2 ] ; then
#alias3="${1}+${2}"
#elif [ $# -eq 3 ] ; then
#alias3="${1}+${2}+${3}"
#elif [ $# -eq 4 ] ; then
#alias3="${1}+${2}+${3}+${4}"
#else echo "header screwed up - exiting" ; sleep 2 ; exit 1
#fi
#
#echo "$alias3"
#
#Posts=10
#
#minday=$(date -d "1 year ago" +%-d)
#minmon=$(date -d "1 year ago" +%-m)
#minyear=$(date -d "1 year ago" +%Y)
#maxday=$(date +%-d)
#maxmon=$(date +%-m)
#maxyear=$(date +%Y)
#
#$Browser http://groups.google.com/groups\?as_q=\&num=${Posts}\&scoring=r\&hl=en\&as_epq=\&as_oq=\&as_eq=\&as_ugroup=\&as_usubject=\&as_uauthors=${alias3}\&lr=\&as_qdr=\&as_drrb=b\&as_mind=${minday}\&as_minm=${minmon}\&as_miny=${minyear}\&as_maxd=${maxday}\&as_maxm=${maxmon}\&as_maxy=${maxyear}\&safe=off
#
#
#
Remove the leftmost column of "#"
AC
Re: Google Groups Script
Author: The Ohmster
Date: Sat, 20 Aug 2005 05:29
Date: Sat, 20 Aug 2005 05:29
32 lines
2105 bytes
2105 bytes
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. Thanks. -- ~Ohmster "Read Ohmster" in subject, bypass spam filter. ohmster /a/t/ newsguy dot com
Re: Google Groups Script
Author: 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
Re: Google Groups Script
Author: »Q«
Date: Sat, 20 Aug 2005 06:23
Date: Sat, 20 Aug 2005 06:23
29 lines
2561 bytes
2561 bytes
The Ohmster <ohmster@ohmster.com> wrote in
<news:slrndgdg1i.bge.ohmster@ohmster.com>:
> 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?
Not sure about the "troll-o-meter" part, but that's it. It grabs the
"real name" part of the From header (either "Ohmster" or "The Ohmster"
in your posts), uses it to construct a Google Groups URL, and passes
that URL to the browser. (Note that you must add your browser to the
script, as AC has left it undefined. Replace "Browser=" with
"Browser=elinks".)
> 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.
It's a fairly basic yet useful script, and it would be a good one to
study for someone trying to learn a bit about bash scripting. But it
does require some knowledge of regular expressions to see what sed is
being called to do.
--
»Q«
links to Xnews resources:
<http://www.cotse.net/users/putty/intro.htm>
Re: Google Groups Script
Author: Blinky the Shark
Date: Sat, 20 Aug 2005 07:13
Date: Sat, 20 Aug 2005 07:13
27 lines
2046 bytes
2046 bytes
The Ohmster wrote: > Does it like find all posts by the individual from google, sort of > like a "troll-o-meter"? Here - use mine. Sample score shown. :) +---------------------------------------+ | | | TROLL-O-METER MK5 | | | | ------------------------------- | | |XXXXXXXXXXXXXXXXXXXXXXX | | | ------------------------------- | | | | | | | | | | | | | | | 0 1 2 3 4 5 6 7 8 9 10 | | | | Pat.Pending blinkynet.net | | | +---------------------------------------+ -- Blinky Linux Registered User 297263 Killing All Posts from GG: http://blinkynet.net/comp/uip5.html End Of The Good GG Archive GUI: http://blinkynet.net/comp/gggui.html
Re: Google Groups Script
Author: Frank Slootweg
Date: Sat, 20 Aug 2005 14:23
Date: Sat, 20 Aug 2005 14:23
24 lines
2304 bytes
2304 bytes
»Q« <boxcars@gmx.net> wrote: > The Ohmster <ohmster@ohmster.com> wrote in > <news:slrndgdg1i.bge.ohmster@ohmster.com>: > > > 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? > > Not sure about the "troll-o-meter" part, but that's it. It grabs the > "real name" part of the From header (either "Ohmster" or "The Ohmster" > in your posts), uses it to construct a Google Groups URL, and passes > that URL to the browser. Using the real name part is rather stupid, as he found out in another group where he searched on a 'real name' of only two characters and then took the wrong conclusions from the result. The *sensible* thing of course is to look *intelligently* at the whole From: line intelligently and then determine which part(s) to use for the Google Groups Advanced Search on Author. Of course that is where AC will (have to) fail. [deleted]
Re: Google Groups Script
Author: The Ohmster
Date: Sat, 20 Aug 2005 16:03
Date: Sat, 20 Aug 2005 16:03
74 lines
3642 bytes
3642 bytes
On 2005-08-20, Alan Connor <zzzzzz@xxx.invalid> wrote: > 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. >> <snip> Okay, I got you Alan. > Gotta learn sh/bash, Ohmster. You'll be a newbie until you do. That is true, AC. I have been a newbie now for like more than 10 years already. :) > comp.unix.shell Yes, this looks like a good newsgroup to subscribe to, will do AC. > 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: Those Orielly books are good. I have "Linux In A Nutshell" and that is how I got this far with vim, they give a very good chapter on it, presented reference style, not like those retarded "Dummy" books. Will keep an eye out for the bash book, that seems like a good way to spend a couple of dollars. > wget -O - http://rute.2038bug.com/rute.html.tar.bz2 | tar -xvvjf - Boy that sure gave me a lot of stuff. Will study it later, hope that it is digestible. *burp* > 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 > Yes, I have to subscribe to those newsgroups. I have alt.os.linux, but the rest are new to me. Thanks Alan. -- ~Ohmster "Read Ohmster" in subject, bypass spam filter. ohmster /a/t/ newsguy dot com
Re: Google Groups Script
Author: »Q«
Date: Sat, 20 Aug 2005 16:43
Date: Sat, 20 Aug 2005 16:43
29 lines
2501 bytes
2501 bytes
Frank Slootweg <this@ddress.is.invalid> wrote in
<news:43073cd8$0$37690$dbd45001@news.wanadoo.nl>:
> Using the real name part is rather stupid, as he found out in
> another group where he searched on a 'real name' of only two
> characters
What kind of stupid punk uses a two-character alias? It's
_obviously_ a sock puppet.
> and then took the wrong conclusions from the result.
I've yet to see a correct conclusion drawn from the use of that script,
but it's not the script's fault.
> The *sensible* thing of course is to look *intelligently* at the
> whole From: line intelligently and then determine which part(s) to
> use for the Google Groups Advanced Search on Author. Of course
> that is where AC will (have to) fail.
IME, I usually end up using either the entire 'real name' part or the
e-mail address. The script could be modified to examine the From
header then present the user with various options about what to send to
Google.
--
»Q«
links to Xnews resources:
<http://www.cotse.net/users/putty/intro.htm>
Re: Google Groups Script
Author: Blinky the Shark
Date: Sat, 20 Aug 2005 17:57
Date: Sat, 20 Aug 2005 17:57
27 lines
2414 bytes
2414 bytes
Frank Slootweg wrote: > »Q« <boxcars@gmx.net> wrote: >> The Ohmster <ohmster@ohmster.com> wrote in >> <news:slrndgdg1i.bge.ohmster@ohmster.com>: >> >> > 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? >> >> Not sure about the "troll-o-meter" part, but that's it. It grabs the >> "real name" part of the From header (either "Ohmster" or "The Ohmster" >> in your posts), uses it to construct a Google Groups URL, and passes >> that URL to the browser. > > Using the real name part is rather stupid, as he found out in another > group where he searched on a 'real name' of only two characters and then > took the wrong conclusions from the result. "Found out" implies that he *realized* it was stupid. Bet he didn't. -- Blinky Linux Registered User 297263 Killing All Posts from GG: http://blinkynet.net/comp/uip5.html End Of The Good GG Archive GUI: http://blinkynet.net/comp/gggui.html
Re: Google Groups Script
Author: Frank Slootweg
Date: Sat, 20 Aug 2005 19:35
Date: Sat, 20 Aug 2005 19:35
12 lines
1773 bytes
1773 bytes
Blinky the Shark <no.spam@box.invalid> wrote: > Frank Slootweg wrote: [deleted] > > Using the real name part is rather stupid, as he found out in another > > group where he searched on a 'real name' of only two characters and then > > took the wrong conclusions from the result. > > "Found out" implies that he *realized* it was stupid. Bet he didn't. Well, after it was pointed out, he kept quiet about it, which, as you know, is rather uncommon. That doesn't *prove* anything, but maybe, just maybe ..... Nah, you're right, can't be!
[OT] Learning Linux and the Shell (was: Re: Google Groups Script)
Author: Alan Connor
Date: Sat, 20 Aug 2005 22:02
Date: Sat, 20 Aug 2005 22:02
95 lines
4051 bytes
4051 bytes
On news.software.readers, in <slrndgel6f.cpk.ohmster@ohmster.com>, "The Ohmster" wrote: <snip> ><snip> > > Okay, I got you Alan. > >> Gotta learn sh/bash, Ohmster. You'll be a newbie until you do. > > That is true, AC. I have been a newbie now for like more than > 10 years already. :) Set aside a 1/2 hour a day to study, and you'll go places like a rocket. > >> comp.unix.shell > > Yes, this looks like a good newsgroup to subscribe to, will do > AC. > >> 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: > > Those Orielly books are good. I have "Linux In A Nutshell" Good one. This is very useful too, with lots of examples you can just 'steal': http://www.tldp.org/LDP/abs/html/ http://www.tldp.org/LDP/abs/html/index.html http://www.tldp.org/LDP/abs/abs-guide.html.tar.gz http://www.tldp.org/LDP/abs/abs-guide.pdf http://www.ibiblio.org/pub/Linux/docs/linux-doc-project/abs-guide/ http://www.ibiblio.org/pub/Linux/docs/linux-doc-project/abs-guide/abs-guide.ps.gz http://www.ibiblio.org/pub/Linux/docs/linux-doc-project/abs-guide/abs-guide.txt.gz A dvanced B ash S hellscripting I got a great difference_in_dates script from there last week, days-between.sh. Good for archiving dated mail and news and such. Dates are tricky. Dam leap years and months with different numbers of days in them and daylight-savings-time.... > and that is how I got this far with vim, they give a very > good chapter on it, presented reference style, not like those > retarded "Dummy" books. Will keep an eye out for the bash book, > that seems like a good way to spend a couple of dollars. > >> wget -O - http://rute.2038bug.com/rute.html.tar.bz2 | tar >> -xvvjf - > > Boy that sure gave me a lot of stuff. It is an entire Linux _curriculum_, a little bit dated in places.I've never come close to reading/studying the whole thing. But it is invaluable as a reference too. I use an alias to make it accessible: alias ru='mozilla file:///home/me/rute.html/node1.html &' Then you can just bookmark whatever page you leave off on. All *sorts* of goodies in there. Check out: 19.9 RAM and Loopback Devices > Will study it later, hope > that it is digestible. *burp* A wee dram of penguin juice will help. > >> 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 > > > Yes, I have to subscribe to those newsgroups. I have > alt.os.linux, but the rest are new to me. Thanks Alan. -- Later, AC -- http://home.earthlink.net/~alanconnor/ http://angel.1jh.com./nanae/kooks/alanconnor.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads