Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database Indexing, Querying, and Rendering using frontmatter attributes #1369

Open
jakefrommars64 opened this issue Jul 18, 2024 · 4 comments

Comments

@jakefrommars64
Copy link

jakefrommars64 commented Jul 18, 2024

Is your feature request related to a problem? Please describe.

I would like to be able to index the frontmatter of notes and submit inline queries that then renders the query results in the preview.

Describe the solution you'd like

The way I imagine this feature working is as follows:

Lets start with an example file structure:

+ root/
|-- index.md
|-+ Projects/
  |-- projects.md
  |-- my-project-1.md
  |-- my-project-2.md
  |-- my-project-3.md

The my-project-[*].md files may look something like this:

/Projects/my-project-1.md

title: My Project 1 ← Foam built-in property
type: project ← Foam built-in property
status: in-progress
target-end-date: 05/24/2026

My Project 1

[...]


The user would like to use /Projects/projects.md as a project management hub. On this page they would like to display a list of all projects and some of their properties that updates automatically. e.g.

/Projects/projects.md

Project Manager

Name Status Target End Date
Project 1 in-progress 05/24/2026
Project 2 planning 04/30/2025
Project 3 complete 12/24/2024

Describe alternatives you've considered

I've also been exploring using scripts to index and query markdown files and insert markdown tables with the results into the desired markdown file. I've also explored adding the capability to run scripts from within a markdown file.

Axetroy Markdown Script
hanskre Markdown Execute

Screenshots or Videos

No response

@oliver-daniel
Copy link

Take a look at MarkdownDB or ContentCollections, two projects with this querying style in mind.

For a little while, I was using MDDB to try to make a less product-dependent version of Obsidian's Dataview (in particular witth the ability to actually write results to the file), but haven't been able to get anything stable yet.

If I could either get that working in a way I like ­-- or better yet, tap into the representation of each file as used by Foam -- I'd likely switch back to VSCode/Foam for my use case.

@jakefrommars64
Copy link
Author

Take a look at MarkdownDB or ContentCollections, two projects with this querying style in mind.

For a little while, I was using MDDB to try to make a less product-dependent version of Obsidian's Dataview (in particular witth the ability to actually write results to the file), but haven't been able to get anything stable yet.

If I could either get that working in a way I like ­-- or better yet, tap into the representation of each file as used by Foam -- I'd likely switch back to VSCode/Foam for my use case.

You understand exactly what I'm trying to do! Foam has a builtin class called Resource that already does the indexing, I'm currently working on integrating this functionality into Foam as a built-in feature.

@stereobooster
Copy link

stereobooster commented Oct 14, 2024

Related #1312

@stereobooster
Copy link

For a little while, I was using MDDB to try to make a less product-dependent version of Obsidian's Dataview (in particular witth the ability to actually write results to the file), but haven't been able to get anything stable yet.

@oliver-daniel try this approach remark-dataview. Remark plugin which takes all code blocks and executes code as query against DB (can be MarkdownDB or ContentCollections).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants