-
Notifications
You must be signed in to change notification settings - Fork 32
Log files
Downloading drawings from a tablet is destructive - the drawings get deleted after a successful download. So we really want to make sure we don't screw things up and log as much as possible to recover the data if need be.
The default directory for all of Tuhi's data storage is $XDG_DATA_DIR/tuhi
, usually $HOME/.local/share/tuhi/
. Inside are the various data files Tuhi uses.
Any communication between Tuhi and the device is logged as a YAML file in $XDG_DATA_DIR/tuhi/<bluetooth address>/raw/
. The files are named after the time they were created, e.g. log-1565844084-2019-08-15-14:41:24.yaml
, i.e. in the format log-$UNIX_TIMESTAMP-$HUMAN_READABLE_TIME.yaml
.
These files contain one single interaction with the device, they are created whenever the device connects. Given that it's BLE, the device will disconnect after any check - every few seconds. Most of the files will not have any useful data in it, grep for PEN
to search for files with Pen data.
The YAML format is not guaranteed to be stable, it is a backup only. The file format is not documented, it's self-descriptive.
Any converted drawing is stored as JSON file in $XDG_DATA_DIR/tuhi/<bluetooth address>/<timestamp>.json
. These are the files that the Tuhi server will make available over DBus. There is no storage guarantee for those files, they may be deleted at any time. They exist primarily to make testing easier, so we can keep a few files around to verify the server part works as expected.
The Tuhi GUI converts JSON files into SVG files. These SVG files temporary files only, they are regenerated e.g. when the orientation changes. Storage for those is not permanent, they are stored in the XDG_CACHE_DIR, i.e. $XDG_CACHE_DIR/tuhi/svg/
. Note that the GUI only handles one device, so there is no bluetooth address encoded here.