From 087735a08ffd17cd96e2afe20c9128ec59cbba40 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 30 Jan 2021 18:54:13 +0100 Subject: [PATCH] Add timestamp to document meta data --- nw/core/document.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nw/core/document.py b/nw/core/document.py index 7e833854..42db1603 100644 --- a/nw/core/document.py +++ b/nw/core/document.py @@ -27,8 +27,10 @@ along with this program. If not, see . import logging import os +from time import time + from nw.constants import nwAlert -from nw.common import isHandle +from nw.common import isHandle, formatTimeStamp from nw.constants import nwItemLayout, nwItemClass logger = logging.getLogger(__name__) @@ -151,6 +153,7 @@ class NWDoc(): f"%%~name: {self._theItem.itemName}\n" f"%%~path: {self._theItem.itemParent}/{self._theItem.itemHandle}\n" f"%%~kind: {self._theItem.itemClass.name}/{self._theItem.itemLayout.name}\n" + f"%%~time: {formatTimeStamp(time())}\n" ) try: