Skip to content

Commit f7e122c

Browse files
committed
Small updates
1 parent b46e5e6 commit f7e122c

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

293 KB
Loading

‎np.Tidy/src/cancelIncompleteTasks.js‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//-----------------------------------------------------------------------------
33
// Cancel incomplete tasks and checklists in calendar notes for a given past year
44
// Jonathan Clark
5-
// Last updated 2026-03-26 for v1.19.0, @jgclark
5+
// Last updated 2026-03-27 for v1.19.0+, @jgclark
66
//-----------------------------------------------------------------------------
77

88
import pluginJson from '../plugin.json'
@@ -166,7 +166,7 @@ export async function cancelIncompleteTasksInPastYear(yearIn: string = ''): Prom
166166
yearStr = String(yearIn)
167167
}
168168
if (!yearStr) {
169-
yearStr = await getInputTrimmed('Which calendar year of past notes do you want to process? (e.g. 2024)', 'OK', 'Cancel incomplete tasks in a past year')
169+
yearStr = await getInputTrimmed('Which calendar year of past notes do you want to process? (e.g. 2024)', 'OK', 'Cancel incomplete tasks')
170170
if (yearStr === false) {
171171
logInfo('cancelIncompleteTasksInPastYear', 'User cancelled at year prompt')
172172
return
@@ -183,7 +183,7 @@ export async function cancelIncompleteTasksInPastYear(yearIn: string = ''): Prom
183183
// Find past calendar notes
184184
const allPastCalendarNotes = pastCalendarNotes()
185185
if (allPastCalendarNotes.length === 0) {
186-
await showMessage('There are no past calendar notes to process.', 'OK', 'Cancel incomplete tasks in a past year')
186+
await showMessage('There are no past calendar notes to process.', 'OK', 'Cancel incomplete tasks')
187187
return
188188
}
189189

@@ -207,15 +207,15 @@ export async function cancelIncompleteTasksInPastYear(yearIn: string = ''): Prom
207207
}
208208
if (i % 50 === 0) {
209209
const progress = i / totalPast
210-
CommandBar.showLoading(true, `Scanning calendar notes for year ${targetYearStr} ...`, progress)
210+
CommandBar.showLoading(true, `Scanning calendar notes for year ${targetYearStr} …`, progress)
211211
}
212212
}
213213

214214
await CommandBar.onMainThread()
215215
CommandBar.showLoading(false)
216216

217217
if (notesToProcess.length === 0) {
218-
await showMessage(`No past calendar notes were found for the year ${targetYearStr}.`, 'OK', 'Cancel incomplete tasks in a past year')
218+
await showMessage(`No past calendar notes were found for the year ${targetYearStr}.`, 'OK', 'Cancel incomplete tasks')
219219
return
220220
}
221221

@@ -279,17 +279,17 @@ export async function cancelIncompleteTasksInPastYear(yearIn: string = ''): Prom
279279
280280
if (grandTotalTasks === 0 && grandTotalChecklists === 0) {
281281
logInfo('cancelIncompleteTasksInPastYear', `🎉 No incomplete tasks or checklists were found in past calendar notes for ${targetYearStr}.`)
282-
await showMessage(`No incomplete tasks or checklists were found in past calendar notes for ${targetYearStr}.`, 'OK', 'Cancel incomplete tasks in a past year')
282+
await showMessage(`No incomplete tasks or checklists were found in past calendar notes for ${targetYearStr}.`, 'OK', 'Cancel incomplete tasks')
283283
return
284284
}
285285
286286
// Build confirmation message
287287
const lines = []
288288
lines.push(`In calendar notes for ${targetYearStr}, I found:`)
289289
lines.push('')
290-
lines.push(`Total notes with incomplete items: ${grandTotalNotes.toLocaleString()}`)
291-
lines.push(`Total incomplete tasks: ${grandTotalTasks.toLocaleString()}`)
292-
lines.push(`Total incomplete checklists: ${grandTotalChecklists.toLocaleString()}`)
290+
lines.push(`${grandTotalNotes.toLocaleString()} notes with incomplete items:`)
291+
lines.push(`- ${grandTotalTasks.toLocaleString()} incomplete tasks`)
292+
lines.push(`- ${grandTotalChecklists.toLocaleString()} incomplete checklists`)
293293
lines.push('')
294294
295295
const teamspaceKeys = Object.keys(statsMap)

0 commit comments

Comments
 (0)