TLDR go to end and please fix code, or read the story of my adapted Konig method.
Hi, I am intrigued by the idea of being able o update my idea inside the table use to roll these up with.
From this thread, it appears to be the best way to do this. The last script below gathers todos from the vault and filters based on a tag.
but it does not appear to work now. it never did on my machine.
For context, I was dabbling with the “Konig” method. Reading my notes and creating ideas. to find them later I tagged them with todo - [Q] quotations and - [I] ideas, which I pull into a table using:
//get all md files in vault
const files = app.vault.getMarkdownFiles()
//create an array with the filename and lines that include the desired tag
let arr = files.map(async(file) => {
const content = await app.vault.cachedRead(file)
//turn all the content into an array
let lines = await content.split("\n").filter(line => line.includes("- [Q]"))
return ["[["+file.name.split(".")[0]+"]]", lines]
})
//resolve the promises and build the table
Promise.all(arr).then(values => {
console.log(values)
//filter out files without "ad-question" and the note with the dataview script
const exists = values.filter(value => value[1][0] && value[0] != "[[dataviewjs-testing]]")
dv.table(["file", "lines"], exists)
})
I prefer to have my quotes in a table next to my ideas. Not this long list. However, the todos are rather pretty. I can live of maybe target them later.
so because I like to see the quotes and ideas, I tag my content like this
“quote:: the is the quote”
“idea:: this is the idea.”
and can see in a table like this
table quote, idea
where quote or idea
sort file.day asc
However, the code below proposes editable todos in a table with both quotes and ideas the best of both worlds does not work. Also correct me if it cannot edit todos in a table. thanks for your help.
My first doubt is: what means for you “edit todos” in a table? Check or uncheck? Or edit the content/text? (if the first you don’t need Tasks plugin; if the second, you need it).
Just an observation: this type of structure doesn’t assure you the direct relation of the pair quote + idea
Hi @mnvwvnm ,
I believe @AlanG implied that his code allowed full TASKs functionality. You thought it was amazing, and so did I. Alas the code did not work.
To answer your question, I am not bothered about ticks.
I would like to edit my ideas in the Table, TASKS or dataview. I was using my Tasks to show quotes and ideas. (relatively “- [Q]”, “- [I]”)
So it would be nice to edit the value of the TASKS, not the status of ticked or not ticked.
It would be easier to edit value in the table and not go back to the original. (Similar to how obsidian updates links). Otherwise, I would have to go back to the original to update typos etc.
@AlanG suggests that his code can create a table, like dataview. But that has TASK functionality.