[emacs] Add new format-clock-line-as-csv function for goPersonio output

This commit is contained in:
Sebastian Schulze 2022-12-07 22:42:49 +01:00
parent 1e70e4d899
commit 7555654d82
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
1 changed files with 9 additions and 0 deletions

View File

@ -296,6 +296,15 @@
do (bascht/format-clock-line-as-csv (org-element-at-point))
(forward-line 1))))
(defun bascht/format-clock-line-as-csv (clock-line)
(let* ((timestamp (org-element-property :value clock-line))
(ts-start (org-timestamp-to-time timestamp))
(ts-end (org-timestamp-to-time timestamp t)))
(message (format "go-personio --work-start '%s' --work-end '%s'"
(format-time-string "%F %a %R %Z" ts-start)
(format-time-string "%F %a %R %Z" ts-end)))))
;; Temporary test-function to re-trigger the export and get the logs
(defun bascht/test-org-clock-to-personio ()
(interactive)