Abracadabra Automating Analog And Report Magic
Posted on 10 Jun 2003
by troy janisch (ideahamster)
Rated 3.41 (Ratings: 1)
- More articles in Code
Step 1: Your Analog CFG fileThere is nothing magical about setting up a good CFG file for Analog. Since CFG files are roughly the same for each platform, I won't waste your time here. Instead, I'll provide you with a few useful links:
- Analog documentation — which tells you how to create a CFG file.
- The RixWeb CFG file creator — which will create a CFG file for you.
- This example CFG file — which you can use for inspiration
Step 2: Your Report Magic INI fileReport Magic INI files need to know where to find your DAT file and where to write the HTML files for the Web Stats report. In this case, here are the relevant links:
- Report Magic Settings Documentation - where you can read about creating an INI file.
- This example INI file which you can use for inspiration.
Step 3: Your Manual Batch FileIf you're setting up Analog or Report Magic for the first time, you'll want to create a batch file that generates historical reports - those for previous month/years that you'll want to view statistics for.The manual batch file needs to include two lines for each report generated. The first is the Analog command. The command above specifies: 1) the location of analog.exe; 2) the log files to be included in the report; and 3) the .CFG file to be executed. For example:
call c:\analog\analog.exe c:\LogFiles\W3SVC9\ex0203*.log +g"c:\stats\config\my.cfg" -GThe second line for each report is the Report Magic command. This command specifies: 1) the location of the rmagic.exe; and 2) the location of the .INI file. For example:
call c:\analog\rmagic.exe c:\stats\config\my.iniThis example generates monthly reports for 2002.
Step 4: The Automated Batch FileThe automated batch file takes the same format as a manual batch file. However, at the beginning of the batch file you must first fetch the current month/year:
@ echo offThen, use the same commands, replacing the appropriate portion of the log file name:
call c:\analog\analog.exe c:\LogFiles\W3SVC9\ex%yy%%mm%*.log +g"c:\stats\config\my.cfg" -GThis example generates a monthly Web stats report.
call c:\analog\rmagic.exe c:\stats\config\my.ini