Replies: 7 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.
-
|
Just pinging to check whether there are any updates on this? |
Beta Was this translation helpful? Give feedback.
-
|
I've been on the hunt for an open-source local-first Coda.io alternative. Coda.io is a WYSIWYG document platform, but its WYSIWYG editor supports blocks that can be variables, tables that are actually databases that can be queried, and formulas/macros/algorithms/computations (which can also be saved as variables) that can query the variables, the database tables, or even run arbitrary code and render the result. The databases behind the tables are are viewed through portals/views which can be filtered subtables, kanbans, calendars, cards, forms, etc. Form fields can be added such as lookups, dropdowns, text fields, number fields, buttons, toggles/checkboxes, etc. These dynamic abilities extend to user installable and makeable packs/plugins, enable the coding engine to query anything from anywhere, beyond the builtin document and cross-document references. These features enable a platform where a simple document, extends to one with tables and databases inside, to full on applications within documents, and documents providing functionality to other documents. This has allowed me to create incredible flows within Coda, however the problem is Coda.io is incredibly slow because all that processing is happening via server-side. An open-source implementation wouldn't have that limit and be able to be local and fast. Here's a video of Coda's dynamic blocks: I've been thinking that an open-source alternative would essentially store everything locally as say markdown documents, which preview would allow embedded and evaluated code blocks, where say a table is actually an interactive rendering of a llocal JSON schema object or a sqlite table or so on. |
Beta Was this translation helpful? Give feedback.
-
|
I should mention that now foam has something similar to data view in the form of "foam-query", more info in the documentation |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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