Documentation and code for manipulating sleep diaries
SleepChart 1.0 is a Windows program, available from a link near the bottom of a page on supermemo.com.
The source code for this program is not publicly available, but there is a link near the bottom of the page offering to release it on request.
We have not been able to find any official documentation about the file format.
You may find the following useful:
During normal use, users will generally do the following:
These commands are rarely useful in normal use, but can be very useful during testing:
Users can also click File then Import from Excel. We have not investigated that feature.
The program describes the two flags using several terms:
To toggle the first flag, the user (un)ticks a menu item labeled Forced awakening. Then a confirmation box appears, which either asks if they want to mark the selected block as interrupted sleep or if they want to mark the selected block as terminated naturally, depending on which way the flag is being toggled.
To toggle the second flag, the user (un)ticks a menu item labeled Delayed retirement. Then a confirmation box appears, which either asks if they want to mark the selected block as forcefully delayed sleep or if they want to mark the selected block as initiated naturally, depending on which way the flag is being toggled.
SleepChart 1.0 uses a simple binary format, containing a series of 12-byte records. Each record contains the following:
This can be represented in C with a struct
:
struct record {
float start, end;
char terminated_naturally, retired_naturally;
char unused[2];
};
Dates are represented as the number of days since Fri 31 Dec 00:00:00 GMT 1999, so for example 1.0
represents Sat 1 Jan 00:00:00 GMT 2000.
Because SleepChart 1.0 doesn’t have a header or other identifying information, a lot of files in other formats can be detected incorrectly as being in SleepChart 1.0 format. However, some features of the SleepChart 1.0 program make it easier to reduce the rate of false positives. Here are some techniques to confirm if a file is actually in this format:
1.0