特定のタグがついているノートのタスクを取り除く
まずは特定のタグがついているノートのタスクを取り除く方法です。 tasksブロックは使わずにDataviewJSのdataviewjsブロックを使います。
const excluded = '(' + dv.pagePaths('#取り除きたいタグ名').array() .map(x => 'path does not include ' + x) .join(') AND (') + ')'const query = `not done${excluded}`
dv.paragraph('`tasks\n' + query + '\n`')
やっていることはタグがついているノートのパスを取得し、そのパスが含まれていないものを取得するクエリを作成しています。
こちらのフォーラムで紹介されている方法を参考にしました。
How can I list tasks from all notes with a certain tag (using the Tasks plugin)? - Help - Obsidian Forum