![]() |
Vitalnix | : User Management Suite |
manual | v1.21 |
ds_sdf - Specifications of the SDF file format
An SDF file is a text file, where each "objects" occupies one line. Empty lines are ignored. The structure of a User Object (herein "user") is similar to a CSV file; in SDF the values are separated by a semicolon:
1;Engelhardt;Jan;12.3.45;11
The different fields are: numeration number within class/subgroup, surname (prenom), name, birthdate and class.
The numeration seems only to be exported by some systems, we do not need it and ignore it. Birthdate can be any format the date_scramble() routine in data.c accepts. They can be:
D.M.Y, M/D/Y, Y-M-D.
D and M can be autoprefixed by zero (i.e. "07.01.2003").
YY can be a two-, three- or four-digit year. 03 is 103 is 2003
(except: 03 is 2103 when we 're in the 22th century).
Comments are similar to shell or C:
#one line comment
(* this comment also only lasts for this line *)
Surname;...
The following will have an impact in the SDF reader (it will not work) (src/uds_sdf.c) as of yet:
Surname;Name;Birthdate;Class (* comment *)
Surname;Name;Birthdate;Class # comment
Concluded, a line is a comment if the first char is a hash mark (#), OR the first two chars are "(*" and the last two are "*)".
If an object is terminated by the \x0D\x0A-newline (typically MS-DOS and Windows), the file is considered ASCII, since the program that exports SDF is DOS-based. So, all chars above 127 must be in ASCII, or certain user names get corrupted.
If the newline termination sequence is only \x0A, the ANSI set is assumed, that is which is used throughout Linux.
The newline termination sequence scanner should not rely on \x0D and \x0A but ask what OS we use. Or even, it should somewhere clearly been stated whether it is ASCII or ANSI.
The SDF format is exported by a (German language) school secretary program called "Kolleg".
July 19 2003