Skip to content

Commit bd8db2c

Browse files
Export Things URLs in csv
1 parent 928d357 commit bd8db2c

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Days/Task : 41.0
120120
## Things URL Helper
121121

122122
The application ```ThingsURLHelper.app``` opens URLs of the form ```thingstodo:show?uuid=XXX``` with XXX being the ```UUID``` of a todo.
123-
By using ```things.sh search``` you can identify the ```UUID``` of a task.
123+
By using ```things.sh csv``` you can identify the according URL of each task and open it via spotlight for example.
124124

125125
## CREDITS
126126
* Author : Arjan van der Gaag (script for Things 2)

plugins/csv.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ myPluginMethod="exportCSV"
99
eval "$myPlugin=('$myPluginCommand' '$myPluginDescription' '$myPluginMethod')"
1010

1111
exportCSV() {
12-
echo 'Title;"Creation Date";"Modification Date";"Due Date";"Start Date";"Completion Date";"Recurring";Project;Area;Subtask;Notes'
12+
echo 'Title;"URI";"Creation Date";"Modification Date";"Due Date";"Start Date";"Completion Date";"Recurring";Project;Area;Subtask;Notes'
1313
sqlite3 -list -separator ';' "$THINGSDB" "$(getCSVQuery1)" | awk '{gsub("<[^>]*>", "")}1' | iconv -c -f UTF-8 -t WINDOWS-1252//TRANSLIT || true
1414
sqlite3 -list -separator ';' "$THINGSDB" "$(getCSVQuery2)" | awk '{gsub("<[^>]*>", "")}1' | iconv -c -f UTF-8 -t WINDOWS-1252//TRANSLIT || true
1515
}
@@ -18,6 +18,7 @@ getCSVQuery1() {
1818
read -rd '' query <<-SQL || true
1919
SELECT
2020
T1.title,
21+
'thingstodo:show?uuid='||T1.uuid,
2122
date(T1.creationDate,"unixepoch"),
2223
date(T1.userModificationDate,"unixepoch"),
2324
date(T1.dueDate,"unixepoch"),
@@ -40,6 +41,7 @@ getCSVQuery2() {
4041
read -rd '' query <<-SQL || true
4142
SELECT
4243
T2.title,
44+
'thingstodo:show?uuid='||T2.uuid,
4345
date(T1.creationDate,"unixepoch"),
4446
date(T1.userModificationDate,"unixepoch"),
4547
"",

plugins/search.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ SELECT
2424
date(T1.startDate,"unixepoch") as "Start",
2525
date(T1.stopDate,"unixepoch") as "Stopped",
2626
T2.title as "Project",
27-
T3.title as "Area",
28-
'thingstodo:show?uuid='||T1.uuid
27+
T3.title as "Area"
2928
FROM $TASKTABLE T1
3029
LEFT OUTER JOIN $TASKTABLE T2 ON T1.project = T2.uuid
3130
LEFT OUTER JOIN $AREATABLE T3 ON T1.area = T3.uuid

0 commit comments

Comments
 (0)