5
5
; ; Author: Aaron Jacobs <[email protected] >
6
6
; ; URL: https://github.com/atheriel/org-clock-csv
7
7
; ; Keywords: org
8
- ; ; Version: 0
8
+ ; ; Version: 1. 0
9
9
10
10
; ; This file is NOT part of GNU Emacs.
11
11
30
30
31
31
; ; In interactive mode, calling `org-clock-csv' will open a buffer
32
32
; ; with the parsed entries from the files in `org-agenda-files' . The
33
- ; ; function can also be called from lisp code with a file list
33
+ ; ; function can also be called from Lisp code with a file list
34
34
; ; argument, and there is an `org-clock-csv-batch' version that will
35
35
; ; output the CSV content to standard output (for use in batch mode).
36
36
47
47
:group 'external )
48
48
49
49
(defcustom org-clock-csv-header " task,category,start,end,effort,ishabit,tags"
50
- " Header for the CSV output. Be sure to keep this in sync with
51
- changes to `org-clock-csv-row-fmt' ."
50
+ " Header for the CSV output.
51
+
52
+ Be sure to keep this in sync with changes to
53
+ `org-clock-csv-row-fmt' ."
52
54
:group 'org-clock-csv )
53
55
54
56
(defcustom org-clock-csv-row-fmt #'org-clock-csv-default-row-fmt
55
57
" Function to parse a plist of properties for each clock entry
56
- and produce a comma-separated CSV row. Be sure to keep this in
57
- sync with changes to `org-clock-csv-header' .
58
+ and produce a comma-separated CSV row.
59
+
60
+ Be sure to keep this in sync with changes to
61
+ `org-clock-csv-header' .
58
62
59
63
See `org-clock-csv-default-row-fmt' for an example."
60
64
:group 'org-clock-csv )
@@ -74,7 +78,7 @@ See `org-clock-csv-default-row-fmt' for an example."
74
78
; ;;; Utility functions:
75
79
76
80
(defsubst org-clock-csv--pad (num )
77
- " Adds a leading zero to a number less than 10."
81
+ " Add a leading zero when NUM is less than 10."
78
82
(if (> num 10 ) num (format " %0 2d" num)))
79
83
80
84
; ;;; Internal API:
@@ -110,7 +114,7 @@ Returns an empty string if no category is found."
110
114
category))
111
115
112
116
(defun org-clock-csv--parse-element (element )
113
- " Ingests clock elements and produces a plist of their relevant
117
+ " Ingest clock ELEMENT and produces a plist of its relevant
114
118
properties."
115
119
(when (and (equal (org-element-type element) 'clock )
116
120
; ; Only ingest closed, inactive clock elements.
@@ -176,7 +180,7 @@ When NO-CHECK is non-nil, skip checking if all files exist."
176
180
177
181
;;;### autoload
178
182
(defun org-clock-csv (&optional infile )
179
- " Export clock entries to CSV format.
183
+ " Export clock entries from INFILE to CSV format.
180
184
181
185
When INFILE is a filename or list of filenames, export clock
182
186
entries from these files. Otherwise, use `org-agenda-files' .
@@ -201,11 +205,11 @@ for use in batch mode."
201
205
202
206
;;;### autoload
203
207
(defun org-clock-csv-batch (&optional infile )
204
- " Export clock entries in CSV format to standard output.
208
+ " Export clock entries from INFILE in CSV format to standard output.
205
209
206
- This function is identical in function to `org-clock-csv'
207
- except that it directs output to `standard-output' . It is
208
- intended for use in batch mode."
210
+ This function is identical in function to `org-clock-csv' except
211
+ that it directs output to `standard-output' . It is intended for
212
+ use in batch mode."
209
213
(let* ((filelist (if (null infile) org-agenda-files
210
214
(if (listp infile) infile (list infile))))
211
215
(entries (org-clock-csv--get-entries filelist)))
0 commit comments