Add timestamp to v2 header

This commit is contained in:
Marcin Kulik
2017-09-03 21:40:33 +02:00
parent f45713c3ec
commit 800b9c99de
2 changed files with 2 additions and 0 deletions

View File

@@ -93,6 +93,7 @@ class Recorder:
'version': 2, 'version': 2,
'width': cols, 'width': cols,
'height': lines, 'height': lines,
'timestamp': int(time.time()),
'env': saved_env, 'env': saved_env,
# TODO save max_wait here # TODO save max_wait here
} }

View File

@@ -30,6 +30,7 @@ The following meta-data is **required** in asciicast v2:
The following meta-data is **optional** in asciicast v2: The following meta-data is **optional** in asciicast v2:
* `timestamp` - Unix timestamp of the beginning of the recording session (integer),
* `duration` - duration of the whole recording in seconds (when it's known upfront), * `duration` - duration of the whole recording in seconds (when it's known upfront),
* `command` - command that was recorded, as given via `-c` option to `asciinema rec`, * `command` - command that was recorded, as given via `-c` option to `asciinema rec`,
* `title` - title of the asciicast, as given via `-t` option to `asciinema rec`, * `title` - title of the asciicast, as given via `-t` option to `asciinema rec`,