home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Excalibur 80
/
Excalibur_80.bin
/
hratelne_dema
/
nhl2001
/
nhlinfo
/
dbexport.txt
< prev
next >
Wrap
Text File
|
1999-09-19
|
3KB
|
85 lines
Notes on export function
------------------------
This function allows to export most of database's data to text file called
export.txt.
This may be usefull for programmers who wants to extract something from
database files but do not have time or interest to read from database
files directly.
If there is enough interest, I will add support for importing edited
export.txt back to database files.
Usage
-----
wnhlinfo.exe <season name/number> -nhlxx -export <destination directory>
-nhlxx parameter must be used if more than one supported game is detected
by nhlinfo.
if <destination directory> is omitted, export.txt will be saved to current
directory.
for example: wnhlinfo.exe exhibition -nhl99 -export
Exporting may take some time depending on CPU speed.
Zero-length file export.lock is created when exporting starts and
is deleted after operation is completed. This file can be used
for detecting when operation is complete by trying to open it
periodically.
Format of export.txt
--------------------
File is divided in chunks. First there is title of chunk (for example:
"[Teams]") and next line shows how many lines of data follows.
Only chunk titles that do not begin with '-' are statistics chunks.
Chunk titles unknown to reader code must be skipped!
First chunk is always [-INFO/x.x]. x.x is currently 1.0 First number is
version. This will be changed if format change requires changes to reader
code. Second number is revision, changes to this number does not require
changes to reader code, but new features may not be available without
updates to reader. Currently there is two lines of data in INFO-chunk
but it may change.
Last chunk [-END] always marks the end of file.
Following chunks contains database statistics. Currently chunks are in
following order: teams, players, goalies, season schedule and playoff
schedule. You must not expect that this order stays in future versions.
Always read and check chunk title before continuing.
After chunk title comes list of all statistics entries. Their format is
following: short name,long name,is editable?,is playoff data included?,
type. After type follows type specific data.
type 0 (number): minimum and maximum value
type 1 (string): maximum length of string
type 2 (multiple): number of choices,choice1,choice2,...
short name=obvious
long name=also obvious
is editable=this entry's statistics data can be changed
is playoff data included=if this is 1, there will be two statistics data
values instead of one. For example: if statistics entry is GP and "is
playoff data included" is one, there will be two "games played" statistics
values, first will be season value and next will be playoff-value.
After statistics entries comes statistics data for every team, player
or goalie. Data is in same order as statistics entries were.
Last number of player/goalie data is number of line entries. Then comes
all lines player/goalie is assigned to.
Note that order of statistics entries can and will change! Never expect for
example that first statistics entry is "NAME" or second is "GP"!
Teams and players are always sorted by their name.