ebullient / obsidian-task-collector Public
generated from obsidianmd/obsidian-sample-pluginNew issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for deleting completed tasks #7
Comments
|
This plugin never deletes tasks, and, TBH, that's a level of potential information loss I don't want to get near. Can you be a little more specific about the workflow you would like, given it has to work well with other kinds of docs that don't support this workflow? |
|
I'm using obsidian-tasks, and I have many recurrent tasks and I don't care about the completed tasks because the plugin automatically creates a new task with the new date. Unfortunately, the plugin doesn't provide a way to deal with these completed tasks, so I thought maybe I could use your plugin to delete them. If I could have only one file where the completed tasks automatically delete, my problem would be solved. example.mov |
|
That helps. Would this work for you? |
|
Thank you for the suggestion, but I have too many completed tasks, so selecting each line manually like that would be too time-consuming. |
|
I think it works for a selection.. (select many lines.. ) |
|
https://github.com/No3371/obsidian-regex-pipeline -- that might work as well (bulk replacement of all matching strings), but I would test in a separate repo first (or use a regular expression tester) to make sure you select only completed tasks matching what the tasks plugins creates. |
Yes but completed tasks are mixed with ongoing tasks so I can't select them all at once
As you said, I have to use your plugin to move them to the bottom, but then how do I bulk select and delete them automatically ?
The problem is that I can't find a command to select the completed tasks, otherwise this would work. |
I'll try this method, thank you for proposing. |
|
I still have to manually apply ruleset with regex pipeline. I was thinking something similar to the setting found in kanban plugin : |
|
The more I'm thinking about this... the more it feels like something the tasks plugin itself should be doing.. as it is creating the list that continually grows and knows / has settings for what those look like. Seems like having a limit for how many of those exist is within its mandate, you might say. |
|
Yeah, you're right. The problem is that the maintainer doesn't have the time to make something like this, as mentioned here. |
|
yea.. I think that person distributes tasks through their repo in a way where the pile up doesn't bother them. Let me think on it. I understand what you're saying, and I'm sympathetic. Thinking about it... The manual application of the ruleset (that you mentioned above) could be applied to a macro... and macros can be invoked as commands.. and I think you can invoke commands using the advanced URI plugin.. which means.. you could script it (outside of obsidian) .. though.. if I were scripting it outside of obsidian.. I would probably opt to transform the file directly. |
|
Has there been any progress on this? I'd like to reset checklist tasks, but I would need to delete older completed tasks beforehand. |
|
I prefer my plugin to remain non-destructive to avoid data loss. Deleting lines is not something I want to do accidentally. This flow (for me) is about archival within a document where completed tasks have context that I still want to refer to later. What I would suggest (if you're game) is to try the https://github.com/No3371/obsidian-regex-pipeline plugin. I suggested this earlier, but here is a more detailed explanation: The regex pipeline plugin uses an index.txt file to list "pipelines" (sequences of regex that should be applied to a document). Have that file list another file called "removeCompletedTasks" (or whatever you like). removeCompletedTasks should then contain something like: If you want to add other conditions (to only remove tasks that follow a certain pattern), that would be doable. You could also add the follow-on bulk reset here, if they should go together. Of course, this approach won't work if you only want to reset tasks in a specific section, in which case, I guess I should be more accommodating. |
|
A way of limiting task reset to a specific section would be even better. |

It would be nice if we could set a maximum number of completed tasks, and if the number of completed tasks exceeds it, the other tasks would automatically be deleted. And of course, if the number is set to "0", then all the tasks completed are deleted automatically.
The text was updated successfully, but these errors were encountered: