X-Google-Thread: f996b,9d6eb660190a32c8 X-Google-Attributes: gidf996b,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe09.iad.POSTED!7564ea0f!not-for-mail Newsgroups: alt.ascii-art From: Faux_Pseudo Subject: Re: ASCII Art Fart for Fri, 2008 Aug 22: #3347 INCONTINENCE References: Reply-To: f0_sud0@yahoo.com User-Agent: slrn/0.9.8.1 (Linux) Lines: 41 Message-ID: NNTP-Posting-Host: 72.218.144.106 X-Complaints-To: newsmaster@cox.net X-Trace: newsfe09.iad 1219634839 72.218.144.106 (Mon, 25 Aug 2008 03:27:19 UTC) NNTP-Posting-Date: Mon, 25 Aug 2008 03:27:19 UTC Organization: Cox Date: Mon, 25 Aug 2008 03:27:19 GMT Xref: g2news1.google.com alt.ascii-art:245 _.-In alt.ascii-art, Faux_Tran wrote the following -._ > #3347 INCONTINENCE > Taken from Well after a few years of regular updates Tran has slacked recently and he is only keeping about 4 farts in queue and they have drained out a few times recently. While the script I wrote to post them here worked fine as long as they were being updated daily his on/off habits of late have caused the script to post the same thing a few days in a row and then I shut it off and manually check to see if he has updated the site before restarting it. That wasn't working so I just updated the script so that if the fart hasn't changed then it will just not post anything. Its a minor but long overdue fix to the script. Below is the new script which I am posting in case somone has need of something like it for other needs. #!/bin/bash ## start bad code that will need updating since ## it has no error checking at all. source /home/faux/.bashrc FART="$(lynx -dump -source http://www.asciiartfarts.com/current.txt)" TITLE="$(echo "$FART" | grep ^\# | head -1 | sed 's/ (.*//')" BODY="$(echo "$FART" | tail +10)" SUBJECT="ASCII Art Fart for $(echo "$FART" | grep ^\# | head -1 | sed -e 's/.*(//' -e 's/).*//'): $TITLE" echo " $TITLE" > /home/faux/.fart echo "$BODY" >> /home/faux/.fart echo -e '\nTaken from ' >> /home/faux/.fart diff /home/faux/.fart /home/faux/.fart.old >/dev/null if [[ "$?" == "0" ]] ; then : ; else newspost -i news.east.cox.net -f "$EDRESS" -F Faux_Tran -n \ alt.ascii-art -s "$SUBJECT" -t /home/faux/.fart #2>/dev/null 1>/dev/null fi cp /home/faux/.fart /home/faux/.fart.old ##EOF -- =()==()==()==()==()- http://fauxascii.com \ \ \ \ \ \ ASCII artist :F_P:-O- -O- -O- -O- -O- -O- -O- Get your ASCII Art T-Shirt: http://www.keystroketshirts.com/ascii/dream-in-ascii-fullView.php