[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Re: Commit email on Windows

From: Johnson, Rick <JohnsonR_at_gc.adventist.org>
Date: 2005-03-30 15:31:08 CEST

I'm not sure I understand the question. It's just being called in plain
old .bat files.

Here is an example of one I use to create pdfs of website statistics and
mail them. The blat reference is at the bottom of the file.

Rick

@ECHO OFF
REM Batch file to create and email pdf of website statistics

REM Takes month year

SETLOCAL
SET awstatsdir=d:\websites\tools\awstats
SET omniformatdir=c:\omniformat
SET outputdir=d:\websites\tools\awstats\pdfs

REM Loop through the recipients
FOR /F "usebackq eol=; tokens=1,* delims=," %%i IN (recipients.txt) DO
CALL :CreateAndSend %%j %%i %1 %2

REM Delete the temp files
ECHO.
ECHO Deleting %1-%2 files
DEL %awstatsdir%\%1-%2-*.html
DEL %outputdir%\%1-%2-*.pdf
DEL %outputdir%\body.txt
GOTO:EOF

:CreateAndSend
REM Create the PDF to Mail
ECHO.
IF NOT EXIST %awstatsdir%\%3-%4-%2.html (
        EChO Creating %3-%4-%2.html
        %awstatsdir%\awstats.pl -config=%2 -output -month=%3 -year=%4
-staticlinks > %awstatsdir%\%3-%4-%2.html
)
IF NOT EXIST %outputdir%\%3-%4-%2.pdf (
              ECHO Creating %3-%4-%2.pdf
        %omniformatdir%\html2pdf995.exe "%awstatsdir%\%3-%4-%2.html"
"%outputdir%\%3-%4-%2.pdf"
)

REM Mail the PDF
ECHO Creating and Sending %2 mail to %1
ECHO Here is your %3-%4 statistics for %2. > %outputdir%\body.txt
ECHO You can view up to date statistics at
http://proverbs.gc.sda.org/tools/awstats/awstats.pl?config=%2 >>
%outputdir%\body.txt
blat body.txt -s "Statistics for %2" -to %1 -server localhost -f
awstats@proverbs.gc.sda.org -attach %3-%4-%2.pdf

GOTO:EOF

ENDLOCAL

> -----Original Message-----
> From: Jason Mills [mailto:jmills@cs.mun.ca]
> Sent: Wednesday, March 30, 2005 8:23 AM
> To: users@subversion.tigris.org
> Subject: Re: Commit email on Windows
>
> How did you set it up? Did you write your own
> python/perl/ruby script to use Blat? Or is there some other
> way I'm unaware of?
>
> Jason
>
> Johnson, Rick wrote:
> > I'm using Blat for auto-build notifications, not for
> repository commits.
> > I can't imagine it would be much different. It's worked flawlessly.
> >
> > Rick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Mar 30 15:35:17 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.