Add timestamp to document meta data

This commit is contained in:
Veronica K. B. Olsen
2021-01-30 18:54:13 +01:00
parent f9b988a232
commit 087735a08f
+4 -1
View File
@@ -27,8 +27,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
import logging import logging
import os import os
from time import time
from nw.constants import nwAlert from nw.constants import nwAlert
from nw.common import isHandle from nw.common import isHandle, formatTimeStamp
from nw.constants import nwItemLayout, nwItemClass from nw.constants import nwItemLayout, nwItemClass
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -151,6 +153,7 @@ class NWDoc():
f"%%~name: {self._theItem.itemName}\n" f"%%~name: {self._theItem.itemName}\n"
f"%%~path: {self._theItem.itemParent}/{self._theItem.itemHandle}\n" f"%%~path: {self._theItem.itemParent}/{self._theItem.itemHandle}\n"
f"%%~kind: {self._theItem.itemClass.name}/{self._theItem.itemLayout.name}\n" f"%%~kind: {self._theItem.itemClass.name}/{self._theItem.itemLayout.name}\n"
f"%%~time: {formatTimeStamp(time())}\n"
) )
try: try: