Delete completed tasks

I’m using the tasks plugin and when completing recurring reminders, I get a big list of tasks

image

As the maintainer can’t support something like this, I was thinking a plugin that automatically delete these type of tasks based on one if not all of these criterias :

  • completion, delete after the task is completed (with a delay of course) ;
  • delete tasks that exceed a max number of completed tasks (set in the plugin settings) just like in the kanban plugin ;
  • recurring deletion based on time/date or opening/closing obsidian.

I already talked to task collector and task archiver with no easy solution found.

What I did was create a bash script that removes all the checked tasks in certain files:

  gsed -i '/^- \[x\]/d' "${pkmDir}"/"${taskFile1}"
  gsed -i '/^- \[x\]/d' "${pkmDir}"/"${taskFile2}"

I am using gsed since I want to use the gnu sed on a mac.

Make sure you have a backup before you do this.
I have set this up to run regularly.

1 Like