-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathplugin.json
More file actions
373 lines (373 loc) · 12.9 KB
/
plugin.json
File metadata and controls
373 lines (373 loc) · 12.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
{
"macOS.minVersion": "10.13.0",
"noteplan.minAppVersion": "3.4.0",
"plugin.id": "dwertheimer.TaskSorting",
"plugin.name": "🥷 Task Sorting & Tools",
"plugin.version": "1.2.1",
"plugin.lastUpdateInfo": "1.2.1: Added 'sortTasksViaExternalCall' hidden command for external calls or other plugins.\n1.2.0: Added heading and sortOrder as params that can be passed. Added \\cnt copy noteTags command.\nInitial release of commands moved from the Task Automations plugin to the TaskSorter plugin.",
"plugin.description": "Commands for sorting tasks in a note",
"plugin.author": "dwertheimer",
"plugin.dependencies": [],
"plugin.script": "script.js",
"plugin.url": "https://github.com/NotePlan/plugins/blob/main/dwertheimer.TaskSorting/README.md",
"plugin.changelog": "https://github.com/NotePlan/plugins/blob/main/dwertheimer.TaskSorting/CHANGELOG.md",
"plugin.commands": [
{
"note": "================== COMMMANDS ========================"
},
{
"name": "Sort tasks on the page",
"description": "ts",
"jsFunction": "sortTasks",
"alias": [
"ts"
],
"arguments": [
"prompt user to choose options",
"sortFields (array of strings)",
"withHeadings (default: false)",
"subHeadingCategory (default: false)"
]
},
{
"name": "Sort tasks under heading",
"description": "Sort tasks under heading",
"jsFunction": "sortTasksUnderHeading",
"alias": [
"tsh"
],
"arguments": [
"heading (string)",
"sortOrder (array of strings) -- see README for details"
]
},
{
"name": "Tasks Sort by User Default (in settings)",
"description": "Tasks Sort by User Default (in settings)",
"jsFunction": "sortTasksDefault",
"alias": [
"tsd"
]
},
{
"name": "Tasks Sort by calendar due date",
"description": "Tasks Sort by calendar due date",
"jsFunction": "sortTasksByDue",
"alias": [
"tsc"
]
},
{
"name": "Tasks Sort by @Mention/person",
"description": "Tasks Sort by @Mention/person",
"jsFunction": "sortTasksByPerson",
"alias": [
"tsm"
]
},
{
"name": "Tasks Sort by #Tag",
"description": "Tasks Sort by #Tag",
"jsFunction": "sortTasksByTag",
"alias": [
"tst"
]
},
{
"name": "Tasks Sort by #Tag + @Mention",
"description": "Tasks Sort by #Tag + @Mention",
"jsFunction": "sortTasksTagMention",
"alias": [
"tstm"
]
},
{
"name": "Tasks to Top - Bring all tasks in note to top",
"description": "Tasks to Top - Bring all tasks in note to top",
"jsFunction": "tasksToTop",
"alias": [
"tt"
]
},
{
"name": "Mark All Tasks on Page (open or complete)",
"description": "Mark All Tasks on Page (open or complete)",
"jsFunction": "markTasks",
"alias": [
"mat"
]
},
{
"name": "cta - Copy tags from previous line",
"description": "Copy #tags and @mentions from previous line",
"jsFunction": "copyTagsFromLineAbove",
"alias": [
"cta"
]
},
{
"name": "cth - Copy tags from heading above",
"description": "Copy #tags/@mentions from heading to all lines between",
"jsFunction": "copyTagsFromHeadingAbove",
"alias": [
"cth"
]
},
{
"name": "ctm - Copy line for each mention",
"description": "Copy line for each @mention, listing it first",
"jsFunction": "copyLineForEachMention",
"alias": [
"ctm"
]
},
{
"name": "ctt - Copy line for each hashtag",
"description": "Copy line for each #hashtag, listing it first",
"jsFunction": "copyLineForEachHashtag",
"alias": [
"ctt"
]
},
{
"name": "cnt - Copy tags from noteTags",
"description": "Copies all noteTags to all tasks in note",
"jsFunction": "addNoteTagsToAllTask",
"alias": [
"cnt"
]
},
{
"name": "Add an onSave trigger to copy noteTags to all tasks",
"description": "Add an onSave trigger to copy noteTags to all tasks",
"jsFunction": "addNoteTagsTriggerToFm"
},
{
"name": "sortTasksViaExternalCall",
"description": "entry point to sortTasks from x-callback etc.",
"jsFunction": "sortTasksViaExternalCall",
"arguments": [
"JSON5 paramater string (withUserInput (boolean), sortFields (Array<string>), withHeadings (boolean), subHeadingCategory (boolean)"
],
"hidden": true
},
{
"name": "triggerCopyNoteTags",
"description": "onEditorWillSave",
"jsFunction": "triggerCopyNoteTags",
"hidden": true
},
{
"name": "Task Sorting: Version",
"NOTE": "DO NOT EDIT THIS COMMAND/TRIGGER",
"description": "Update + Check Version",
"jsFunction": "versionCheck"
},
{
"name": "onOpen",
"NOTE": "DO NOT EDIT THIS COMMAND/TRIGGER",
"description": "entry point for onOpen trigger",
"jsFunction": "onOpen",
"hidden": true
},
{
"name": "onEditorWillSave",
"NOTE": "DO NOT EDIT THIS COMMAND/TRIGGER",
"description": "entry point for onEditorWillSave trigger",
"jsFunction": "onEditorWillSave",
"hidden": true
},
{
"name": "onMessageFromHTMLView",
"NOTE": "DO NOT EDIT THIS COMMAND/TRIGGER",
"description": "dwertheimer.TaskSorting: Callback function to receive messages from HTML view",
"jsFunction": "onMessageFromHTMLView",
"hidden": true
},
{
"name": "Task Sorting: Update Plugin Settings",
"NOTE": "DO NOT EDIT THIS COMMAND/TRIGGER",
"description": "Preferences",
"jsFunction": "editSettings"
}
],
"plugin.settings": [
{
"note": "================== SETTINGS ========================"
},
{
"COMMENT": "Plugin settings documentation: https://help.noteplan.co/article/123-plugin-configuration",
"type": "heading",
"title": "Task Sorting Settings"
},
{
"type": "hidden",
"key": "pluginID",
"default": "dwertheimer.TaskSorting",
"COMMENT": "This is for use by the editSettings helper function. PluginID must match the plugin.id in the top of this file"
},
{
"type": "heading",
"title": "Task Sorting Default Settings"
},
{
"key": "defaultSort1",
"title": "Default Sort: Primary Sort Field",
"description": "When invoking the default sorting method (/tsd), sort first by this field. Note: a minus in front means sort that key in reverse order. hashtags are for #tags, mentions are for @mentions, priority is the number of !!!'s and content is alphabetical.",
"type": "string",
"default": "-priority",
"required": true,
"choices": [
"priority",
"-priority",
"due",
"-due",
"mentions",
"-mentions",
"hashtags",
"-hashtags",
"content",
"-content"
]
},
{
"key": "defaultSort2",
"title": "Default Sort: Secondary Sort Field",
"description": "When invoking the default sorting method (/tsd), sort secondly by this field (for all fields in the first sort pass above which were the same). Note: a minus in front means sort that key in reverse order. hashtags are for #tags, mentions are for @mentions, priority is the number of !!!'s and content is alphabetical.",
"type": "string",
"default": "hashtags",
"required": true,
"choices": [
"priority",
"-priority",
"due",
"-due",
"mentions",
"-mentions",
"hashtags",
"-hashtags",
"content",
"-content"
]
},
{
"key": "defaultSort3",
"title": "Default Sort: Tertiary Sort Field",
"description": "When invoking the default sorting method (/tsd), sort thirdly by this field (for all fields in the first sorts pass above which were the same). Note: a minus in front means sort that key in reverse order. hashtags are for #tags, mentions are for @mentions, priority is the number of !!!'s and content is alphabetical.",
"type": "string",
"default": "mentions",
"required": true,
"choices": [
"priority",
"-priority",
"due",
"-due",
"mentions",
"-mentions",
"hashtags",
"-hashtags",
"content",
"-content"
]
},
{
"key": "outputOrder",
"title": "Output order (by type)",
"description": "After tasks are sorted, tasks are grouped by their type (status). In what order do you want the task groups outputted?",
"choices": [
"open, scheduled, done, cancelled",
"open, scheduled, cancelled, done",
"done, cancelled, open, scheduled",
"open, done, cancelled, scheduled",
"open, cancelled, done, scheduled",
"scheduled, open, done, cancelled",
"scheduled, open, cancelled, done",
"scheduled, done, cancelled, open",
"scheduled, cancelled, done, open",
"done, open, cancelled, scheduled",
"done, scheduled, cancelled, open",
"cancelled, open, done, scheduled",
"cancelled, scheduled, done, open",
"cancelled, done, open, scheduled",
"cancelled, done, scheduled, open"
],
"type": "string",
"default": "open, scheduled, done, cancelled",
"required": true
},
{
"key": "sortInHeadings",
"title": "Sort tasks separately for each heading?",
"description": "For all quick task sorting commands (other than /ts), do you want each set of tasks under each heading to be sorted separately and placed back underneath the heading? Uncheck this if you want to ignore the headings in the sort.",
"type": "bool",
"default": true,
"required": true
},
{
"key": "tasksToTop",
"title": "Put tasks at the top (before any textual items)?",
"description": "After tasks are sorted, do you want to put all the tasks at the top of the note (or section), before any other text? Uncheck this if you want the tasks to float to the bottom beneath any other text.",
"type": "bool",
"default": true,
"required": true
},
{
"key": "includeHeading",
"title": "Include Task Status Heading in Output?",
"description": "For all quick task sorting commands (other than /ts), you can specify whether you want the headings to be in the output or not. Task Status headings are, e.g. 'Open Tasks', 'Completed Tasks’, etc.",
"type": "bool",
"default": true,
"required": true
},
{
"key": "includeSubHeading",
"title": "Include Primary Sort Key Heading in Output?",
"description": "For all quick task sorting commands (other than /ts), you can specify whether you want the subheadings to be in the output or not. Sort Key headings are, e.g. '#tagA', or '@PersonB', etc.",
"type": "bool",
"default": true,
"required": true
},
{
"key": "eliminateSpinsters",
"title": "Eliminate Headings with No Content",
"description": "After running this command multiple times, you may end up with widowed headings that have no content underneath. If this is checked, after tasks are sorted, the plugin will delete any third/fourth level headings with no content underneath.\nBEWARE: It's pretty smart/careful about what empty headings it deletes, but if you have other empty 4th level headings ending in a colon in your document, don't!",
"type": "bool",
"default": false,
"required": true
},
{
"key": "stopAtDoneHeading",
"title": "Stop at 'Done' or 'Cancelled' heading",
"description": "Some people like to archive tasks on a page under a '## Done' or '## Cancelled' heading. If this is option is checked, tasks under the Done/Cancelled heading will be ignored for sorts. If there is no Done or Canclled heading, it will process the entire page.",
"type": "bool",
"default": false,
"required": true
},
{
"note": "================== DEBUGGING SETTINGS ========================"
},
{
"NOTE": "DO NOT CHANGE THE FOLLOWING SETTINGS; ADD YOUR SETTINGS ABOVE ^^^",
"type": "separator"
},
{
"type": "heading",
"title": "Debugging"
},
{
"key": "_logLevel",
"type": "string",
"title": "Log Level",
"choices": [
"DEBUG",
"INFO",
"WARN",
"ERROR",
"none"
],
"description": "Set how much logging output will be displayed when executing Task Sorting commands in NotePlan Plugin Console Logs (NotePlan -> Help -> Plugin Console)\n\n - DEBUG: Show All Logs\n - INFO: Only Show Info, Warnings, and Errors\n - WARN: Only Show Errors or Warnings\n - ERROR: Only Show Errors\n - none: Don't show any logs",
"default": "INFO",
"required": true
}
]
}