Replies: 4 comments 25 replies
-
That plugin is quite amazing, it would be totally possible with the API. For the rendering in md preview it would just plug into the regular VS Code markdown-it hook. If someone is interested in building something like that for Foam I would be happy to provide support on my side. |
Beta Was this translation helpful? Give feedback.
-
So I've been learning about vscode extensions and researching how to do this. The biggest blocker at the moment is trying to use markdowndb sqlite inside a vscode extension. Simply put, native node modules are a really bad idea in vscode extensions. One alternative would be to use sqlite.js. This is a javascript-only implementation of sqlite. It is limited in that it must read the entire database into memory. This might not be a problem for smaller repos but I don't know how it would scale. I'm also not quite sure how indexing would work. I've looked more at how obsidian-dataview works and it seems like obsidian is a browser environment so they are using a library called localForage which assumes a browser environment. Over the years they've considered nodejs implementation but they've been pretty resistant, so getting help could be challenging. The most straightforward implementation would be to run a separate server, preferably in a docker instance to simplify local dependencies. This could take care of the querying and the indexing. As for the query language, I'm not sure it is worth doing something other than sql. The query language in obsidian-dataview gets pretty complex when you start to need joins. I would consider simplifying the sql somewhat to insulate from the underlying implementation for storing arbitrary metadata in a json text field. I can also look at what it would take to use the dataview query language. In general I'm not too interested in writing yet another query language. I think for my initial attempt to figure this out I'll use an external process for the queries and write an extension to connect to it and hook into the markdown preview rendering and go from there. Writing this all out got me wondering if there is a markdown extension that will render shell output. Yes there is: https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk I'm going to give that a quick try first, since sqlite3 has markdown output. |
Beta Was this translation helpful? Give feedback.
-
I've been making progress, however slowly. I've been able to update markdowndb with support for a separate tasks table so that a query like this is now working:
There is plenty of opportunity for simple macro templates and I took standard date fields from obsidian dataview and made them columns (due, completion, created, start, scheduled). |
Beta Was this translation helpful? Give feedback.
-
I recently created this remark plugin remark-dataview. If you have any markdown-to-db solution (like BrainDB, MarkdownDB) you can easily implement this. Having real database makes implementation so much easier, no need to write your own SQL parser and evaluator. |
Beta Was this translation helpful? Give feedback.
-
There is an excellent (looking) plugin for Obsidian https://github.com/blacksmithgu/obsidian-dataview that allows you to embed rich and dynamic content in your knowledge base.
Having such dynamic content would be a huge thing for me as it would close the gap for automating some lists of content in certain places.
Is this something that might at least be possible with the API (when it is released)? Would it require another extension on top of foam to take over the viewing and editing of markdown files?
I found the discussion of GTD, but that is getting a little stale.
Beta Was this translation helpful? Give feedback.
All reactions