Fix incorrect key bug
This commit is contained in:
parent
542e859b8a
commit
3f73f871e6
25
init.org
25
init.org
|
@ -2330,25 +2330,26 @@ Only tracks for today's date are considered."
|
|||
(dir (concat "/media/data/phone/contrapunctus/Nokia 6.1/Android/data/net.osmand.plus/files/tracks/rec/"
|
||||
(format-time-string "%+4Y-%m/" day)))
|
||||
(dir-check (file-exists-p dir))
|
||||
(activity t)
|
||||
(files (cl-loop for file in (directory-files dir)
|
||||
(plists (cl-loop with activity
|
||||
for file in (directory-files dir)
|
||||
when (and (string-match-p (format-time-string "^%F_" day)
|
||||
file)
|
||||
(or (and (string-match-p "(walk)" file)
|
||||
(setq activity :walking))
|
||||
(and (string-match-p "(run)" file)
|
||||
(setq activity :running))))
|
||||
collect file))
|
||||
(plists (cl-loop for file in files collect
|
||||
(with-current-buffer
|
||||
(get-buffer-create (find-file-noselect (concat dir file)))
|
||||
(append '(:name "Exercise")
|
||||
`(,activity (,(floor (my-gpx-distance file)) . "meters"))
|
||||
(my-get-gpx-timestamps))
|
||||
;; (chronometrist-insert (chronometrist-active-backend))
|
||||
)))
|
||||
collect
|
||||
(with-current-buffer
|
||||
(get-buffer-create
|
||||
(find-file-noselect (concat dir file)))
|
||||
(append '(:name "Exercise")
|
||||
`(,activity (,(floor (my-gpx-distance file)) . "meters"))
|
||||
(my-get-gpx-timestamps))
|
||||
;; (chronometrist-insert (chronometrist-active-backend))
|
||||
)))
|
||||
(string (mapconcat (lambda (plist)
|
||||
(format "%S" plist)) plists "\n")))
|
||||
(chronometrist-plist-pp plist))
|
||||
plists "\n")))
|
||||
(progn (kill-new string)
|
||||
(message "Copied %s to kill ring" string))
|
||||
(message "No suitable GPX files found")))
|
||||
|
|
Loading…
Reference in New Issue