home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / TGAUP200.ZIP / TGAVG.DOC < prev    next >
Text File  |  1998-11-10  |  19KB  |  414 lines

  1.                        Telegard Average User Profiler v2.00
  2.                                by Ken Reaverson
  3.                                 For TG 3.09+ 
  4.  
  5. ┌─────────────────────────────────────────────────────────────────────────────┐
  6. │▒▒ Introduction ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
  7. └─────────────────────────────────────────────────────────────────────────────┘
  8.  
  9.  Telegard Average User Profiler (hereafter referred to as TGAUP) is a third
  10.  party utility which will read from a Telegard BBS's user file, average the
  11.  statistics for users in three different category (Male,Female, Overall) and
  12.  output that information in a user definable template.
  13.  
  14. ┌─────────────────────────────────────────────────────────────────────────────┐
  15. │▒▒ License and Disclaimer ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  16. └─────────────────────────────────────────────────────────────────────────────┘ 
  17.  
  18.  The author of TGAUP is not responsible for any damaged, corrupted, lost,
  19.  or otherwise harmful occurences that may occur from use (or inability
  20.  thereof) of this program. It has been tested, and the author runs it on his
  21.  own system. To the best of my knowledge, TGAUP has no bugs and will not
  22.  destroy anything on your system. However, I guarentee nothing, except that
  23.  this program will take up hard drive space.
  24.  
  25.  No Warranty is given, either expressed or implied, as to the functionality
  26.  of this software program. By using this program, you are agreeing not to
  27.  hold the author, Kenneth Reaverson, responsible for any damages (consequential
  28.  or incidental) that arise from your ability to use or misuse this program,
  29.  that you have read this entire document, and are familiar with its terms,
  30.  and agree to exempt Kenneth Reaverson from any and all responsibilities in
  31.  the event of any damages to your system which are caused either through
  32.  direct or indirect use of this software.
  33.  
  34.  If it breaks, you own both halves.
  35.  
  36. ┌─────────────────────────────────────────────────────────────────────────────┐
  37. │▒▒ Requirements ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  38. └─────────────────────────────────────────────────────────────────────────────┘ 
  39.  
  40.  TGAUP's requirements differ depending on which executable is being run:
  41.  
  42.    TGAUP/DOS:
  43.  
  44.      - MS-DOS (or compatible) 5.00 or higher
  45.      - Telegard BBS v3.09.g1 or higher
  46.      - An 80286 processor or better
  47.  
  48.    TGAUP/2:
  49.  
  50.      - OS/2 Warp 3 or higher
  51.      - Telegard BBS v3.09.g1 or higher
  52.      - An 80486 processor or better
  53.  
  54. ┌─────────────────────────────────────────────────────────────────────────────┐ 
  55. │▒▒ Installation ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  56. └─────────────────────────────────────────────────────────────────────────────┘ 
  57.  
  58.  Installation of TGAUP is simple. First, decide which executable you're going
  59.  to use (DOS or OS/2) and rename it either TGAVG.DOS or TGAVG.OS2 to
  60.  TGAVG.EXE. Once this is done, decide where you want the executable (the
  61.  author recommends the main Telegard directory). If the TELEGARD environmental
  62.  variable is defined, TGAUP can be run from anywhere on the system. Otherwise
  63.  it must be run from the main Telegard directory.
  64.  
  65.  The template file must be in the same directory as the executable. Either
  66.  create your own, or use the default TGAVG.TPL included in the archive.
  67.  
  68. ┌─────────────────────────────────────────────────────────────────────────────┐
  69. │▒▒ Usage ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  70. └─────────────────────────────────────────────────────────────────────────────┘ 
  71.  
  72.  TGAUP is best run as part of the logoff process, or as a nightly event.
  73.  It's all up to the sysop. I personally run it after every caller logs off.
  74.  TGAUP will detect and skip deleted user records that have yet to be packed
  75.  out of the userfile.
  76.  
  77.  Since TGAUP does seperate averages for Males and Females, it is recommended
  78.  that System.Config->Newuser->I. Gender be set to Yes in your Telegard
  79.  configuration. Otherwise, TGAUP will see all users without a gender specified
  80.  as Female. Yeah, I could program a way around that, but I don't want to. ;)
  81.  
  82.    TGAVG.EXE will accept the following on the commandline:
  83.  
  84.      First Parameter:
  85.  
  86.          Template - This is the user definable template that TGAUP will
  87.                     read in and spit back out with the totals on it.
  88.  
  89.             /?    - A small help screen. If this parameter is defined, all
  90.                     following parameters are ignored.
  91.  
  92.             /V    - A small screen of miscellanous information about the
  93.                     program. If this parameter is defined, all following
  94.                     parameters are ignored.
  95.  
  96.  
  97.      Second Parameter:
  98.  
  99.            Output - This is the filename to give the bulletin that TGAUP
  100.                     will create. TGAUP will automatically create this
  101.                     file in your TEXT\ directory, as defined in CONFIG.TG
  102.  
  103.  
  104.          Example: TGAVG.EXE TGAVG.TPL BULLET1.MSG
  105.  
  106.      Third Parameter (Optional):
  107.  
  108.                 # - TGAUP outputs the average # of k downloaded/uploaded
  109.                     in all three categories. In addition to the number,
  110.                     a lowercase 'k' is added to the end, and is included
  111.                     when the MCI translates. The default color assigned
  112.                     to that 'k' is |07 (Light Grey). This parameter allows
  113.                     the end user to change that default color. This should
  114.                     be a two digit number, ranging from 01 to 15, and
  115.                     the numbers correspond to the standard Forum Pipe
  116.                     Codes (ie, |07 for Light Grey, |15 for White, |14
  117.                     for Yellow, etc). Do *not* specify a | on the commandline,
  118.                     it is assumed. Only the two digit number is needed.
  119.                     If this parameter is defined, then it must be
  120.                     the third on the commandline.
  121.  
  122.      Fourth Parameter (Optional):
  123.  
  124.                /S - This specifies whether or not the Sysop's statistics
  125.                     will be included in the averaging. By default, TGAUP
  126.                     will not include the sysop's numbers. It is the opinion
  127.                     of the author that the Sysop is anything but an average
  128.                     user, and the inclusion of his/her totals throws off
  129.                     the real averages quite a bit. However, for those
  130.                     who feel differently, simply specify this parameter,
  131.                     and TGAUP will accomadate you. This can be either
  132.                     the third or the fourth parameter on the commandline.
  133.                     If it's the third, then nothing else may be defined
  134.                     behind it. If you do define a fourth parameter with
  135.                     /S as the third, then the /S will be ignored. If /S
  136.                     is defined as the fourth, then it must be preceeded
  137.                     by the K-Color parameter mentioned above.
  138.  
  139. ┌─────────────────────────────────────────────────────────────────────────────┐
  140. │▒▒ MCI Codes & The Template ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  141. └─────────────────────────────────────────────────────────────────────────────┘
  142.  
  143.  TGAUP allows the user to define their own custom template. I recommend that
  144.  the template be a standard ascii file using Telegard specific color codes
  145.  as opposed to an ANSI file. An Ansi file may very well work with TGAUP, I
  146.  don't know, I haven't tried it. ;)
  147.  
  148.  TGAUP reads the template line by line, looks for MCI codes, translates them,
  149.  and then writes that line to the output file.
  150.  
  151.  MCI Codes come in two varieties: Format MCI Codes and Statistic MCI codes.
  152.  
  153. Statistical MCI Codes:
  154.  
  155.    Statistic MCI codes translate to the various statisical averages that TGAUP
  156.    collects. Statistical MCI codes are 3 characters long. Staying with the
  157.    Telegard standard for MCI codes, they begin with a ~.
  158.  
  159.    The next character determines which set of data a statistic will be pulled
  160.    from:
  161.  
  162.      M - Male
  163.      F - Female
  164.      T - Overall
  165.  
  166.    The final character determines which statistic will be displayed:
  167.  
  168.      1 - Average # of Calls
  169.      2 - Average # of Public Posts
  170.      3 - Average # of Private Posts
  171.      4 - Average # of Netmail Posts
  172.      5 - Average # of Uploaded/K
  173.      6 - Average # of Downloaded/K
  174.      7 - Average # of Uploads
  175.      8 - Average # of Downloads
  176.      9 - Average Total Time Online
  177.      A - Average # of Mins/Call
  178.      B - Average User Age
  179.  
  180.    So therefore, if you wanted to display the average Male user age, the
  181.    MCI Code would ~MB. If you wanted to display the Overall average # of
  182.    Public Posts, the MCI code would be ~T3. If you wished to show the average
  183.    # of kilobytes uploaded by female users, the MCI code would be ~F5.
  184.  
  185.    I know, this sounds confusing for the new guys. :) The easiest way to
  186.    remember is this: An MCI code has three parts. The tilde(~), which tells
  187.    TGAUP that the following two letters are an MCI code, and need to be
  188.    translated. The second part determines the sex from which the statistic
  189.    will be pulled (Male, Female, or All) and the final part determines which
  190.    statistic is actually displayed.
  191.  
  192.    In addition to these 33 MCI codes, there are 3 more available:
  193.  
  194.      ~TM - Total # of Male Users
  195.      ~TF - Total # of Female Users
  196.      ~TU - Total # of Users
  197.  
  198.    These are statistical MCI codes, but since they don't follow the above
  199.    convention, I chose to mention them seperately. Anywhere one of these
  200.    MCI codes appears in the template, they will translate to their respective
  201.    totals.
  202.  
  203. Format MCI Codes: 
  204.   Format MCI codes are just what they sound like: They format text. The valid
  205.   MCI codes that TGAUP will recognize are as follows:
  206.  
  207.     ~EL - Left Justified
  208.     ~ER - Right Justfied
  209.     ~EC - Center
  210.  
  211.   The Format MCI codes affect the next statistical MCI code. Immedietly
  212.   following a format code must be a number in the range of 1 to 40.
  213.   This number specifies how many spaces to pad the MCI code out to before
  214.   justification or centering.
  215.  
  216.   For example, to center the Average Age of all Users within 20 spaces,
  217.   the MCI code would look like this:
  218.  
  219.   ~EC20~TB
  220.  
  221.   This would cause TGAUP to insert 20 spaces, beginning from where the first
  222.   ~ appears, and the Average User Age would appear as the 10th and 11th
  223.   characters (assuming a two digit average user age ;)).
  224.  
  225.   NOTE: When centering, if an item cannot be placed at the exact center
  226.         of the string (same number of spaces on each side of the data),
  227.         the extra space will be added after the translated code. All space
  228.         you specify will be accounted for, and remainders get tacked on to
  229.         the end.
  230.  
  231.   Say you wanted to left justify the Average Female Public Posts out to 9
  232.   spaces. The MCI Code would be ~EL9~F2. If your total was, say 320, then
  233.   320 would appear starting where the first ~ was, and 6 empty spaces would
  234.   be added after it. Right justify works the same way, except that the
  235.   empty spaces are added first.
  236.  
  237.   NOTE: Do *not* define a leading 0 if the number of spaces to pad is
  238.         less than 10. ~EC5 is valid. ~EC05 is not.
  239.  
  240.   I've tried to keep this as near to Telegard as I possibly could, so if
  241.   you've experience creating your own custom screens in TG, this should
  242.   be old hat to you.
  243.  
  244. ┌─────────────────────────────────────────────────────────────────────────────┐
  245. │▒▒ Notes ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  246. └─────────────────────────────────────────────────────────────────────────────┘ 
  247.  
  248.  This was probably the most valuable learning experience I've had to date.
  249.  Adding the ability for custom templates to this program required me to
  250.  figure out how to do what I wanted on my own.
  251.  
  252.  When creating your templates, keep in mind that MCI values are dynamic and
  253.  tend to change often. This is important, as if you don't allocate enough
  254.  space (or any) in your templates for growth, they'll start appearing
  255.  out of whack. The easiest way to do this is to remove all extra spaces from
  256.  your template and tell TGAUP to add them via one of the Formatting MCI
  257.  codes when it translates and justifies the next Statistical MCI code.
  258.  
  259.  Take this for example:
  260.  
  261.  ┌─────────┐
  262.  │   ~TU   │
  263.  └─────────┘
  264.  
  265.  That's the MCI for total overall users. Let's just say, for the sake
  266.  of arguement, you've got one user. What happens?
  267.  
  268.  It ends up looking like this:
  269.  
  270.  ┌─────────┐
  271.  │    1  │
  272.  └─────────┘
  273.  
  274.  As you can see, this is *not* the boxed effect you were going for.
  275.  
  276.  However, what happens if you tack those two missing spaces on in a
  277.  justification code?
  278.  
  279.  ┌─────────┐
  280.  │    ~EL3~TU   │
  281.  └─────────┘
  282.  
  283.  That's what the MCI would look like (note, it's 3 spaces because you
  284.  want to make up that extra two, plus the data is taking up one.
  285.  
  286.  The MCI here looks disjointed, but that's okay. Because when TGAUP goes
  287.  to translate, the MCI code is deleted, and it looks something like this:
  288.  
  289.  ┌─────────┐
  290.  │       │
  291.  └─────────┘
  292.  
  293.  Since you've told it to display an MCI code out to three characters,
  294.  justified left, the 1 appears where the first ~ was, and two empty
  295.  spaces are tacked on, for the final appearance of this:
  296.  
  297.  ┌─────────┐
  298.  │    1    │
  299.  └─────────┘
  300.  
  301.  That's probably the effect you were going for. What happens if you
  302.  have a sudden expansion of growth, and now have 357 users? Well, those
  303.  two empty spaces it's tacking on will be filled with the other two numbers
  304.  instead.
  305.  
  306.  Note that if you do not specify enough space for the code to display in
  307.  it's entirety, it will act as though it hasn't been justified at all (ie,
  308.  it will insert all necessary spaces and no extra).
  309.  
  310.  So if you specified ~EL3~TU, and you had 1500 users, 1500 would display
  311.  beginning from the first ~.
  312.  
  313.  Templates are mostly a matter of trial and error. Remember to account
  314.  for the space, and you should come out fine. If you absolutely, positively
  315.  cannot get a template to display the way you want it, send me a copy of
  316.  what you want the final output to look like, and I'll make it into a
  317.  template myself. :)
  318.  
  319.  One more warning: When considering how many spaces to pad out for
  320.  the various Uploaded/K & Downloaded/K MCI codes, add three. :) The reason
  321.  for this is that there's a color code added in to that string, right before
  322.  the 'k' is appended. That color code does count towards your overall space
  323.  as far as TGAUP is concerned. Telegard translates the color code,
  324.  effectively removing it from the string, and taking away three spaces that
  325.  TGAUP thought it had covered when the template was made. :)
  326.  
  327.  TGAUP/DOS has been compiled with Borland Pascal v7.0.
  328.  
  329.  TGAUP/2 has been compiled with Virtual Pascal v1.10                          
  330.  
  331.  The source code to either version is not available to the public, and it     
  332.  is not for sale, so please don't ask. :)                                     
  333.  
  334. ┌─────────────────────────────────────────────────────────────────────────────┐
  335. │▒▒ Registration ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  336. └─────────────────────────────────────────────────────────────────────────────┘ 
  337.  
  338.  TGAUP is FreeWare. End of story. Live free or die, ladies and gentlemen. :)  
  339.  
  340. ┌─────────────────────────────────────────────────────────────────────────────┐
  341. │▒▒ Distribution ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  342. └─────────────────────────────────────────────────────────────────────────────┘ 
  343.  
  344.  TGAUP may be freely distributed in it's unmodified format. See PACKING.LST
  345.  for a list of what should be included in the archive. The archive's original
  346.  fornat is ZIP, and it has been stamped with my AV codes. If the archive
  347.  you've received is not a ZIP, be wary. When unzipping this archive, at
  348.  the very end, you should see the following:
  349.  
  350.  Authentic Files Verified!   # CIS105
  351.  Blood Enterprises, Inc.
  352.  
  353.  If this message is not present, the archive may have been tampered with.
  354.  
  355. ┌─────────────────────────────────────────────────────────────────────────────┐
  356. │▒▒ Copyrights ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  357. └─────────────────────────────────────────────────────────────────────────────┘ 
  358.  
  359.      Telegard Average User Profiler is Copyright Blood Enterprises, 1998.
  360.                                     All Rights Reserved.
  361.  
  362.      Telegard is Copyright Tim Strike, 1994,1998. All Rights Reserved.        
  363.  
  364. ┌─────────────────────────────────────────────────────────────────────────────┐
  365. │▒▒ Special Thanks ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  366. └─────────────────────────────────────────────────────────────────────────────┘ 
  367.  
  368.  The following people deserve special thanks for their efforts, whether it
  369.  be direct or indirect, for bringing this utility about:
  370.  
  371.       Tim Strike  - As always, and always. Keep up the good work, man. :)
  372.  
  373.      David Stumpf &
  374.       Scott Adams - For some initial help in getting the concept of processing
  375.                     a text file line by line. ;)
  376.  
  377.      Arthur Stark - For patiently enduring my bitching on IRC while trying
  378.                     to figure this stuff out. ;)
  379.  
  380.     Black Sabbath &
  381.         Biohazard - For providing such cool music to distract me when I
  382.                     started to get frustrated. ;)
  383.  
  384. ┌─────────────────────────────────────────────────────────────────────────────┐
  385. │▒▒ Future Plans ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  386. └─────────────────────────────────────────────────────────────────────────────┘ 
  387.  
  388.  Well, I plan to run for governor of Minnesota next term. If Jessie Ventura
  389.  can win it, than I damned well better be able to. ;)
  390.  
  391.  All levity aside, the only thing planned for TGAUP are bugfixes should any
  392.  pop up. Since I've rewritten and added a good portion of code, I'm betting
  393.  that I screwed up somewhere. :) Hopefully someone will catch it and I'll
  394.  fix it, but until that time, the TGAUP code gathers dust.
  395.  
  396. ┌─────────────────────────────────────────────────────────────────────────────┐ 
  397. │▒▒ Service & Support ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ 
  398. └─────────────────────────────────────────────────────────────────────────────┘ 
  399.  
  400.  Contact Information -                                                        
  401.  
  402.    Author: Ken Reaverson                                                      
  403.     Email: tremere@mindless.com                                               
  404.       WWW: http://www.darktech.org/shadowdale
  405.   Netmail: 1:133/1004   - FidoNet                                             
  406.            111:4350/101 - Sysop's TechNet                                     
  407.  EchoMail: TG_SUPPORT (FidoNet)                                               
  408.            ADV_TG (AdventureNet)                                              
  409.  
  410.  If you have a question or a problem with the software, by all means, get     
  411.  into contact with me via one of the above methods. I welcome comments and    
  412.  suggestions, and if you find a bug in the software, I'll do my damndest to   
  413.  fix it with all speed.
  414.