Works on Dataview task objects (for example dervied from nextActions.js, and toggles status, tags and scheduled dates. Preserves block IDs at the end.
Toggles tasks done using the executeToggleTaskDoneCommand API of the Tasks plugin for Obsidian.
async function processFile(file, line, blockID) { | |
const cachedData = await app.vault.cachedRead(file); | |
return app.vault.process(file, (data) => { | |
if (cachedData !== data) { | |
data = cachedData; | |
} | |
let lines = data.split("\n"); | |
lines[line] += ` ^${blockID}`; | |
data = lines.join("\n"); |
async function nextActions(userTag = null) { | |
let actionTags = ["todo/next-action", "todo/inbox", "todo/someday-maybe"] | |
// const exclusion = ""; | |
let nextActions; | |
let chosenTag = ""; | |
if (userTag) { | |
actionTags.unshift(userTag); | |
}; | |
for (const tag of actionTags) { | |
nextActions = await runQuery(tag); |
Works on Dataview task objects (for example dervied from nextActions.js, and toggles status, tags and scheduled dates. Preserves block IDs at the end.
Toggles tasks done using the executeToggleTaskDoneCommand API of the Tasks plugin for Obsidian.
/* | |
* Zotero Kanban Reading List by FeralFlora // https://github.com/FeralFlora/ | |
* Version 1.6.1 | |
* Setup and usage guide at: https://share.note.sx/e612da498b038c3e5e367043782e2b59 | |
* Support at: https://discord.com/channels/686053708261228577/1176414557900648541 | |
*/ | |
const fs = require('fs'); | |
const KANBAN_PATH = "Kanban board file path"; | |
const BIBLIOGRAPHY_PATH = "Bibliography file path"; |