🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bc.general
Article #63930

Re: BC Weather up again

#63930
From: George Phillips
Date: Tue, 23 Mar 1993 19:24
49 lines
2297 bytes
In article <C4BE92.8LG@wimsey.bc.ca> sl@wimsey.bc.ca (Stuart Lynne) writes:
>I've got bc.weather up and running again. Comments welcome. 
>One reader has already asked if it could be translated to lower case. The
>answer is yes it could. I tried it that way, I didn't think it looked all
>that much better. But I can post it either way. Let me know what you think if
>you have strong opinions either way. Does anyone have a filter that would do
>intelligent case switching - i.e. lower case everything except first char of
>titles and/or first word sentences.

Upper case text makes me gag.  Here's a perl script which does a pretty
good job.  I posted it when bc.weather first started so there's probably
a few extra special-cases to be added.  It's a pretty easy translation
job since the text is mostly fixed.

I'm mildly tempted to make an even better script which reformats the
text into some nice tables, but I'll see if you even use this one first.

			-- George

Da script:

#!/bin/sh
echo Rain.

Snort.  Just kidding, here's the real script:

#!/cs/local/bin/perl

undef $/;
$_ = <>;

tr/A-Z/a-z/;

s/\b(vancouver|victoria|fraser|charlottes|whistler|canada|canadian)\b/\u$1/g;
s/\bbritish(\s+)columbia\b/British$1Columbia/g;
s/\bchilcotin-cariboo/Chilcotin-Cariboo/g;
s/\bsunshine(\s+)coast/Sunshine$1Coast/g;
s/\b(bc)\b/\U$1/g;

s/\b(pst|pdt|pm|am)\b/\U$1/g;

s/\b(monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b/\u$1/g;
s/\b(january|february|march|april|may|june|july)\b/\u$1/g;
s/\b(august|september|october|novemeber|december)\b/\u$1/g;

s/([a-z])/\U$1/;
s/(\.\s+)([a-z])/$1\U$2/g;

print;
Technical Details
Message-ID: <1ono4kINNsvp@yukongold.cs.ubc.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!torn!utnut!utcsri!cs.ubc.ca!yukongold.cs.ubc.ca!not-for-mail
References: <C4BE92.8LG@wimsey.bc.ca>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 106cdd,add07cbb268ee48b
X-Google-Attributes: gid106cdd,public
X-Google-ArrivalTime: 1993-03-23 12:05:48 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!torn!utnut!utcsri!cs.ubc.ca!yukongold.cs.ubc.ca!not-for-mail
From: phillips@cs.ubc.ca (George Phillips)
Newsgroups: bc.general
Subject: Re: BC Weather up again
Date: 23 Mar 1993 11:24:04 -0800
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Lines: 49
Distribution: bc
Message-ID: <1ono4kINNsvp@yukongold.cs.ubc.ca>
References: <C4BE92.8LG@wimsey.bc.ca>
NNTP-Posting-Host: yukongold.cs.ubc.ca