home *** CD-ROM | disk | FTP | other *** search
/ Excalibur 80 / Excalibur_80.bin / hratelne_dema / nhl2001 / nhlinfo / dbexport.txt < prev    next >
Text File  |  1999-09-19  |  3KB  |  85 lines

  1.  
  2. Notes on export function
  3. ------------------------
  4.  
  5. This function allows to export most of database's data to text file called
  6. export.txt.
  7.  
  8. This may be usefull for programmers who wants to extract something from
  9. database files but do not have time or interest to read from database
  10. files directly.
  11.  
  12. If there is enough interest, I will add support for importing edited
  13. export.txt back to database files.
  14.  
  15.  
  16. Usage
  17. -----
  18.  
  19. wnhlinfo.exe <season name/number> -nhlxx -export <destination directory>
  20.  
  21. -nhlxx parameter must be used if more than one supported game is detected
  22. by nhlinfo.
  23. if <destination directory> is omitted, export.txt will be saved to current
  24. directory.
  25.  
  26. for example: wnhlinfo.exe exhibition -nhl99 -export
  27.  
  28. Exporting may take some time depending on CPU speed.
  29.  
  30. Zero-length file export.lock is created when exporting starts and
  31. is deleted after operation is completed. This file can be used
  32. for detecting when operation is complete by trying to open it
  33. periodically.
  34.  
  35.  
  36. Format of export.txt
  37. --------------------
  38.  
  39. File is divided in chunks. First there is title of chunk (for example:
  40. "[Teams]") and next line shows how many lines of data follows.
  41.  
  42. Only chunk titles that do not begin with '-' are statistics chunks.
  43. Chunk titles unknown to reader code must be skipped!
  44.  
  45. First chunk is always [-INFO/x.x]. x.x is currently 1.0 First number is
  46. version. This will be changed if format change requires changes to reader
  47. code. Second number is revision, changes to this number does not require
  48. changes to reader code, but new features may not be available without
  49. updates to reader. Currently there is two lines of data in INFO-chunk
  50. but it may change.
  51.  
  52. Last chunk [-END] always marks the end of file.
  53.  
  54. Following chunks contains database statistics. Currently chunks are in
  55. following order: teams, players, goalies, season schedule and playoff
  56. schedule. You must not expect that this order stays in future versions.
  57. Always read and check chunk title before continuing.
  58.  
  59. After chunk title comes list of all statistics entries. Their format is
  60. following: short name,long name,is editable?,is playoff data included?,
  61. type. After type follows type specific data.
  62. type 0 (number): minimum and maximum value
  63. type 1 (string): maximum length of string
  64. type 2 (multiple): number of choices,choice1,choice2,...
  65.  
  66. short name=obvious
  67. long name=also obvious
  68. is editable=this entry's statistics data can be changed
  69. is playoff data included=if this is 1, there will be two statistics data
  70. values instead of one. For example: if statistics entry is GP and "is
  71. playoff data included" is one, there will be two "games played" statistics
  72. values, first will be season value and next will be playoff-value.
  73.  
  74. After statistics entries comes statistics data for every team, player
  75. or goalie. Data is in same order as statistics entries were.
  76.  
  77. Last number of player/goalie data is number of line entries. Then comes
  78. all lines player/goalie is assigned to.
  79.  
  80. Note that order of statistics entries can and will change! Never expect for
  81. example that first statistics entry is "NAME" or second is "GP"!
  82.  
  83. Teams and players are always sorted by their name.
  84.  
  85.