From 45dc81dd5016f0f3825fec8aaf9c7dc16fdaea11 Mon Sep 17 00:00:00 2001 From: jonas Date: Tue, 13 Oct 2020 17:19:47 +0200 Subject: Add operator / linux username to the annotation file. --- image-record-annotate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/image-record-annotate.py b/image-record-annotate.py index 341cfe4..7ea1c01 100644 --- a/image-record-annotate.py +++ b/image-record-annotate.py @@ -18,6 +18,9 @@ import code # entering the interactive mode at a certain point: code.interact(lo IMAGE_WIDTH = 1280 IMAGE_HEIGHT = 960 +import getpass +OPERATOR = getpass.getuser() + class ImageLabel(tk.Label): def __init__(self, *args, **kwargs): @@ -230,12 +233,13 @@ def annotation_text(filenames, annotation_panel, cam_control_panel): _str += 'camera: O-3020 (color, rolling shutter, serial no.: 10030)\n' _str += 'lense: C-Mount 6mm 1/2.7" IR MP, with IR cutoff filter\n' _str += 'exposure time: {:f}s\n'.format(cam_control_panel.exposure_time.value) - _str += 'sensitivity: {:f}%'.format(cam_control_panel.sensitivity.value) + _str += 'sensitivity: {:f}%\n'.format(cam_control_panel.sensitivity.value) _str += '\n' _str += 'date: {:s}\n'.format(ap.date) _str += 'time: {:s}\n'.format(ap.time) + _str += 'operator: {:s}\n'.format(OPERATOR) _str += '\n' -- cgit v1.2.1