Skip to content

Commit

Permalink
fixing CLOCK with whitespace prefix, 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rksm committed Aug 13, 2019
1 parent 2965341 commit d562ad2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION := 0.2.0
VERSION := 0.3.0

CLJ_FILES := $(shell find . -type f \
\( -path "./test/*" -o -path "./dev/*" -o -path "./src/*" \) \
Expand Down Expand Up @@ -61,6 +61,7 @@ $(JAR): cljs $(AOT) pom.xml
jar: $(JAR)

run-jar: jar
cp $(JAR) org-analyzer-el/org-analyzer.jar
java -jar $(JAR) -m org-analyzer.http-server

# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Expand Down Expand Up @@ -110,7 +111,6 @@ emacs-package: $(EMACS_PACKAGE_DIR)
-C $(EMACS_PACKAGE_DIR)/.. $(EMACS_PACKAGE_NAME)

$(EMACS_PACKAGE_DIR): update-version $(JAR)
cp $(JAR) org-analyzer-el/org-analyzer.jar
@mkdir -p $@
cp -r org-analyzer-el/*el org-analyzer-el/*jar $@

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ and run it! (double click or from command line, see below).

*2019-08-13: MELPA package is pending, see [the melpa pull request](https://github.com/melpa/melpa/pull/6365).*

For the time being, emacs support can be enabled by downloading the [emacs package](https://github.com/rksm/clj-org-analyzer/releases/download/0.2.0/org-analyzer-for-emacs-0.2.0.tar.gz) directly, extracting it and adding it to your load path and require it:
For the time being, emacs support can be enabled by downloading the [emacs package](https://github.com/rksm/clj-org-analyzer/releases/download/0.3.0/org-analyzer-for-emacs-0.3.0.tar.gz) directly, extracting it and adding it to your load path and require it:

```elisp
(add-to-list 'load-path "/path/to/org-analyzer-0.2.0/")
(add-to-list 'load-path "/path/to/org-analyzer-0.3.0/")
(require 'org-analyzer)
```

Expand All @@ -64,12 +64,12 @@ Afterwards, you can start the tool via `M-x org-analyzer-start`.

## Commandline

Download the lates jar as described above and start it with `java -jar org-analyzer-0.2.0.jar`.
Download the lates jar as described above and start it with `java -jar org-analyzer-0.3.0.jar`.

The following command line options are available, as per `java -jar org-analyzer-0.2.0.jar --help`:
The following command line options are available, as per `java -jar org-analyzer-0.3.0.jar --help`:

```
Usage: java -jar org-analyzer-0.2.0.jar [opt*] [org-file-or-dir*]
Usage: java -jar org-analyzer-0.3.0.jar [opt*] [org-file-or-dir*]
Interactive visualization of timetracking data (org clocks).
Expand Down
2 changes: 1 addition & 1 deletion org-analyzer-el/org-analyzer-pkg.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(define-package
"org-analyzer"
"0.2.0"
"0.3.0"
"org-analyzer is a tool that extracts time tracking data from org files.")
4 changes: 2 additions & 2 deletions org-analyzer-el/org-analyzer.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;; Author: Robert Krahn <[email protected]>
;; URL: https://github.com/rksm/clj-org-analyzer
;; Keywords: calendar
;; Version: 0.2.0
;; Version: 0.3.0
;; Package-Requires: ((emacs "24"))

;; Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -43,7 +43,7 @@

(defvar org-analyzer-process-buffer nil "The buffer for running the jar.")

(defvar org-analyzer-version "0.2.0" "Version to sync with jar.")
(defvar org-analyzer-version "0.3.0" "Version to sync with jar.")

(defvar org-analyzer-jar-file-name "org-analyzer.jar" "The name of the jar of the org-analyzer server.")

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>org.rksm</groupId>
<artifactId>org-analyzer</artifactId>
<packaging>jar</packaging>
<version>0.2.0</version>
<version>0.3.0</version>
<name>org-analyzer</name>
<description>An app that creates an interactive visualization of org-mode time-tracking data (org clockin).</description>
<url>http://github.com/rksm/clj-org-analyzer</url>
Expand Down
1 change: 1 addition & 0 deletions src/org_analyzer/processing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
(for [[i line] (map-indexed vector lines)
:let [[_ stars text] (re-find headline-re line)
[metadata] (re-find metadata-re line)
metadata (and metadata (s/trim metadata))
clock (when (and metadata (s/starts-with? metadata "CLOCK:")) metadata)
[_ file-prop-name prop-value] (re-find file-props-re line)
line-no (inc i)]
Expand Down
10 changes: 5 additions & 5 deletions test/org_analyzer/test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
(is (= expected-date-time (process/parse-timestamp "2019-06-19 Mittwoch 13:44")))
(is (= expected-date-time (process/parse-timestamp "2019-06-19 13:44"))))

(let [expected-date (LocalDateTime/of 2019 6 19 0 0 0)]
#_(let [expected-date (LocalDateTime/of 2019 6 19 0 0 0)]
(is (= expected-date (process/parse-timestamp "2019-06-19 Wednesday")))
(is (= expected-date (process/parse-timestamp "2019-06-19")))
(is (= expected-date (process/parse-timestamp "2019-06-19 Mi")))))
Expand Down Expand Up @@ -58,10 +58,10 @@ text here
CREATED: [2018-12-15 Sa 12:05]
:END:
** TODO section 2.1 :section21tag:
:LOGBOOK:
CLOCK: [2018-02-20 Tue 14:36]--[2018-02-20 Tue 15:00] => 0:24
CLOCK: [2018-02-19 Mon 18:20]--[2018-02-19 Mon 18:58] => 0:38
:END:
:LOGBOOK:
CLOCK: [2018-02-20 Tue 14:36]--[2018-02-20 Tue 15:00] => 0:24
CLOCK: [2018-02-19 Mon 18:20]--[2018-02-19 Mon 18:58] => 0:38
:END:
" )

(def expected-org-data '({:type :file,
Expand Down

0 comments on commit d562ad2

Please sign in to comment.