diff --git a/elisp/chronometrist.el b/elisp/chronometrist.el index 7d0cabc..05e2424 100644 --- a/elisp/chronometrist.el +++ b/elisp/chronometrist.el @@ -1875,6 +1875,23 @@ Return value is either a list in the form t)) ;; replace-last:1 ends here +;; [[file:chronometrist.org::*backend][backend:1]] +(defclass chronometrist-timeclock-backend (chronometrist-file-backend-mixin) + ((extension :initform "timelog" + :accessor chronometrist-backend-ext + :custom 'string))) + +(chronometrist-register-backend :timeclock + "Store records in the timeclock.el format." + (make-instance 'chronometrist-timeclock-backend :path chronometrist-file)) +;; backend:1 ends here + +;; [[file:chronometrist.org::*to-hash-table][to-hash-table:1]] +(cl-defmethod chronometrist-to-hash-table ((backend chronometrist-timeclock-backend)) + (with-slots (file) backend + )) +;; to-hash-table:1 ends here + ;; [[file:chronometrist.org::*remove-prefix][remove-prefix:1]] (defun chronometrist-remove-prefix (string) (replace-regexp-in-string "^chronometrist-" "" string)) diff --git a/elisp/chronometrist.org b/elisp/chronometrist.org index b841e25..5d68f44 100644 --- a/elisp/chronometrist.org +++ b/elisp/chronometrist.org @@ -2897,6 +2897,26 @@ We apply the same hack as in the [[hack-note-plist-group-insert][insert]] method (cl-defmethod chronometrist-count-records ((backend chronometrist-plist-group-backend))) #+END_SRC +*** timeclock backend +**** backend :class: +#+BEGIN_SRC emacs-lisp +(defclass chronometrist-timeclock-backend (chronometrist-file-backend-mixin) + ((extension :initform "timelog" + :accessor chronometrist-backend-ext + :custom 'string))) + +(chronometrist-register-backend :timeclock + "Store records in the timeclock.el format." + (make-instance 'chronometrist-timeclock-backend :path chronometrist-file)) +#+END_SRC + +**** to-hash-table +#+BEGIN_SRC emacs-lisp +(cl-defmethod chronometrist-to-hash-table ((backend chronometrist-timeclock-backend)) + (with-slots (file) backend + )) +#+END_SRC + ** Migration :PROPERTIES: :CUSTOM_ID: program-migration