Many months ago ago, Januk Aggarwal wrote this system of six
templates, that generates the time and time-zone tag shown on the
first line of my replies. The system of templates automatically
corrects the time zone for Standard (S) or Daylight (D) time. Here is
a typical line that was generated by the system of templates, and the
kludges of the message being replied to, when I replied to a non-AOL
user's message:
Fri, 6 Sep 2002 21:40:13 [GMT -0400] (9:40 PM EDT here) you wrote:
Date: Fri, 6 Sep 2002 21:40:13 -0400
From: Daniel Grunberg <[EMAIL PROTECTED]>
X-Mailer: The Bat! (v1.61) Educational
Reply-To: Daniel Grunberg <[EMAIL PROTECTED]>
X-Priority: 3 (Normal)
Message-ID: <[EMAIL PROTECTED]>
To: Dick Wylie <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Dr Donnelly's office hours
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
+++++++++++++++++++++++++++++++
Unfortunately, the templates have a known "AOL anomaly" problem. Here
is a typical line that was generated by the system of templates, and
the kludges of the message being replied to when I replied to an AOL
user's message:
Sat, 16 Aug 2003 11:46:45 [GMT EDT] (11:46 AM ET here) you wrote:
Return-Path: <[EMAIL PROTECTED]>
Received: from imo-r07.mx.aol.com ([152.163.225.103]) by mta010.verizon.net
(InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP
id <[EMAIL PROTECTED]>
for <[EMAIL PROTECTED]>; Sat, 16 Aug 2003 10:46:57 -0500
Received: from [EMAIL PROTECTED]
by imo-r07.mx.aol.com (mail_out_v36_r1.1.) id 6.152.22e15628 (4116)
for <[EMAIL PROTECTED]>; Sat, 16 Aug 2003 11:46:45 -0400 (EDT)
From: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Date: Sat, 16 Aug 2003 11:46:45 EDT
Subject: Space Request Forms
To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="part1_152.22e15628.2c6fabe5_boundary"
X-Mailer: 6.0 sub 10577
+++++++++++++++++++++++++++++++
If I'm replying to an AOL user's message I must manually delete "GMT "
and I must manually insert a D or an S (as appropriate)in the middle
of "ET". Januk has suggested that I might post it this on TBtech.
Does anyone have any ideas about how to fix the AOL anomaly?
Note: At the time that Januk wrote the templates, I was uncomfortable
(to say the least) with TheBat!'s editor, so I used my editor of
choice to work on the templates, as I tested and modified them.
For my convenience, I stored the templates in my file structure,
instead of making them Quick templates inside TheBat!. This
turned out to be a good thing: it let me protect the final
template files with the read-only attribute.
It was only necessary to modify the Reply template I already had
on TheBat! by adding the %Include line, so that's what I did.
(If I were to do it again (or if I weren't so lazy), I'd keep
the Reply_Template file, suitably read-only protected, within my
file structure too. Then the Reply template inside TheBat would
have only one line: %INCLUDE "<path>\Reply_Template.txt")
Copies of my version of Januk's templates are included below. I'm in
the Eastern Time Zone (EST=GMT-5, EDT=GMT-4), so the templates have
been tweaked for Eastern Time. (The D in EDT on the first line of this
message automatically would have been an S, if it had been
appropriate.) If you are in my time zone, you won't have to make any
changes to the time keeping. However, if you aren't in my time zone,
you'd have to tweaks as follows:
In TZSelect.txt, change the "-500" and the "-400" to your
Standard GMT offset and your Daylight GMT offset respectively
(where 000 would indicate GMT, -100 would indicate one hour
earlier than GMT, +100 would indicate one hour later than
GMT, -330 would indicate three hours and thirty minutes
earlier than GMT, etc.).
In reply_time.txt, on the 5th line, change the E (before
"%Include=) to the abbreviation for your time zone.
You can use my versions of Januk's templates by creating your own
template file structure, and by copying the Reply template to the
Reply template inside TheBat! You'd have to modify the paths in the
%Include lines in all of the filed templates and in the Reply template
inside TheBat. Or you could copy the templates onto appropriately
named Quick templates, with the %Include lines that refer to the filed
templates changed to %QINCLUDE lines referring to the appropriately
named Quick templates.
Here are my ReplyTemplate and Januk's system of six templates:
+++++++++
======START of my ReplyTemplate
Hi %TOFNAME,
%INCLUDE="C:\Program Files\The Bat!\Templates\reply_time.txt" you wrote:
%QUOTESTYLE=""%QUOTES
%CURSOR%-
%PUT="C:\Program Files\The Bat!\Signatures\DanSig.txt"
======END of my ReplyTemplate
======START of Januk's reply_time.txt
======END of Januk's reply_time.txt
Hi %TOFNAME,
%INCLUDE="C:\Program Files\The Bat!\Templates\reply_time.txt" you wrote:
%QUOTESTYLE=""%QUOTES
%CURSOR%-
%PUT="C:\Program Files\The Bat!\Signatures\DanSig.txt"
%CALC=_%-
%-
%-%-%Comment="%-
%-%-
%-%-%-%-%SetPattRegExp='(?im-s)^Date:.*(Sun|Mon|Tue|Wed|Thu|Fri|Sat)'%-
%-%-%-%-%RegExpMatch='%Headers'"%-
%-%-
%-%-%Include="C:\Program Files\The Bat!\Templates\DOW-Num.txt" - %-
%-%-
%-%-%Comment="%ODate='ddd'"%-
%-%-
%-%-%Include="C:\Program Files\The Bat!\Templates\DOW-Num.txt"_%-
%-
%Comment=""%-
%If:"%-
%SetPattRegExp='(?im-s)^Date:.*?(Sun|Mon|Tue|Wed|Thu|Fri|Sat)'%-
%RegExpMatch='%Headers'"<>"%ODate='ddd'":" %ODate='ddd'"%-
%IF:"%Comment"="Sun":"1"%-
%IF:"%Comment"="Mon":"2"%-
%IF:"%Comment"="Tue":"3"%-
%IF:"%Comment"="Wed":"4"%-
%IF:"%Comment"="Thu":"5"%-
%IF:"%Comment"="Fri":"6"%-
%IF:"%Comment"="Sat":"7"%-
%WRAPPED='%SETPATTREGEXP="(?m-s)^Date\:\s*?((.*?[\d]{4})\s*?([\d]{0,2}\:%-
[\d]{0,2}\:[\d]{0,2})\s*?(.*))"%-
%REGEXPBLINDMATCH="%HEADERS"%-
%SUBPATT="2" %SUBPATT="3" [GMT%SUBPATT="4"]%-
(%OTIME E%Include="C:\Program Files\The Bat!\Templates\TZSelect.txt"T%-
%Include="C:\Program Files\The Bat!\Templates\DifferentDay.txt"%-
here)
%Comment=`%Calc=~%-
%-
%REM=" Extract Hour and GMT offset "%-
%-
%SETPATTREGEXP="(?im-s)^Date\:.*?\s(\d{0,2})\:(\d{0,2})\:\d{0,2}\s.*?([-+])(\d{2})(\d{2})"%-
%REGEXPBLINDMATCH="%HEADERS"%-
%-
%REM=" Local hour - GMT hour (converted to minutes) "%-
%-
((%OTIME="hh" - (%SUBPATT="1" - (%SUBPATT="3"%SUBPATT="4")))*60 + %-
%-
%REM=" Local Minute - GMT minute "%-
%-
( %OTime="nn" - (%SUBPATT="2" - (%SUBPATT="3"%SUBPATT="5"))) + %-
%-
%REM=" Correct for straddling days in the different zones "%-
%-
%If:"%Include=_C:\Program Files\The Bat!\Templates\DateDiff.txt_"="-6":"1":"%-
%If:'%Include=_C:\Program Files\The Bat!\Templates\DateDiff.txt_'='6':'-1':'%-
%Include=_C:\Program Files\The Bat!\Templates\DateDiff.txt_'" * (-24)*60)%-
%-
%REM=" Convert back to hhmm format "%-
%-
/60 * 100~`%-
%-
%REM=" Convert to standard notation for half hour timezones "%-
%If:"%-
%-%-%SetPattRegExp='(\d\d)$'%-
%-%-%RegExpMatch='%Comment'"="50":"%-
%-
%-%-%SetPattRegExp='^(.*)\d\d$'%-
%-%-%RegExpMatch='%Comment'%-
%-%-30":"%Comment"%-
%-
%Comment=''%-
%IF:"%Include='C:\Program Files\The Bat!\Templates\TZOffset.txt'"="-500":"S"%-
%IF:"%Include='C:\Program Files\The Bat!\Templates\TZOffset.txt'"="-400":"D"%-
________________________________________________________
http://www.silverstones.com/thebat/TBUDLInfo.html