[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV Lynx and JavaScript -Reply
From: |
Doug Lawson |
Subject: |
Re: LYNX-DEV Lynx and JavaScript -Reply |
Date: |
Sat, 16 Nov 1996 11:53:43 -0500 (EST) |
On Fri, 15 Nov 1996, Filip M Gieszczykiewicz wrote:
> You (Doug Lawson) wrote:
> > On Thu, 14 Nov 1996, Filip M Gieszczykiewicz wrote:
> > > Greetings. And it's soo easy to ask users to include a valid date in a
> > > custom comment line. I use:
> > > <!-- TLJSETDATE 01/01/01 -->
> > OK, I'll bite - how are you processing this html (or proto-html) ?
>
> Greetings. Easy - with awk (or perl, but that doesn't work yet). I
> perl rewrite is in progress.. alas, I'm wondering why fix what ain't broke..
> so it's going slowly... ;-)
Hmmm - off thetop of my head, something like:
---------------------------------------------------------------------------
#!/usr/whatever/perl -i.bak
# use the -i switch for in place editing of each file listed
# on the command line
@Months = ("January",
"February",
"March",
"whatever..." );
($Csec,$Cmin,$Chour,$Cmday,$Cmon,$Cyear,$Cwday,$Cyday,$Cisdst) =
localtime($CTime);
$DateString = sprintf("%s %2d %4d",$Months[$Cmon],$Cmday,(1900 + $Cyear));
while(<>)
{ if (/<\!-- *TLJSETDATE *--\>/o)
{ s/TLJSETDATE/$DateString/g;}
}
-----------------------------------------------------------------------
I'm not sure what your whole script is trying to do, but this will
replace all instance of "TLJSETDATE" with the current date in the
form "November 16 1996".
Later
Doug
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;
- Re: LYNX-DEV Lynx and JavaScript -Reply, (continued)
Re: LYNX-DEV Lynx and JavaScript -Reply, Audin Malmin, 1996/11/14
Re: LYNX-DEV Lynx and JavaScript -Reply, Scott McGee (Personal), 1996/11/14
- Re: LYNX-DEV Lynx and JavaScript -Reply, Roger Hill, 1996/11/14
- Re: LYNX-DEV Lynx and JavaScript -Reply, Doug Lawson, 1996/11/14
- Re: LYNX-DEV Lynx and JavaScript -Reply, Filip M Gieszczykiewicz, 1996/11/14
- Re: LYNX-DEV Lynx and JavaScript -Reply, Doug Lawson, 1996/11/15
- Re: LYNX-DEV Lynx and JavaScript -Reply, Filip M Gieszczykiewicz, 1996/11/15
- Re: LYNX-DEV Lynx and JavaScript -Reply,
Doug Lawson <=
- Re: LYNX-DEV Lynx and JavaScript -Reply, Doug Lawson, 1996/11/16
LYNX-DEV Helper apps, Wayne Buttles, 1996/11/16
Re: LYNX-DEV Lynx and JavaScript -Reply, Scott McGee (Personal), 1996/11/14
Re: LYNX-DEV Lynx and JavaScript -Reply -Reply, David Godshall, 1996/11/14
Re: LYNX-DEV Lynx and JavaScript -Reply, Scott McGee (Personal), 1996/11/14
Re: LYNX-DEV Lynx and JavaScript -Reply, WHITLOCK, 1996/11/14