silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.06k stars 146 forks source link

Make tables a queryable object #725

Closed gorootde closed 4 months ago

gorootde commented 4 months ago

Since tables are somehow already a data structure, why not make them also queryable as a data object?

Proposal for the spec & docs in Objects.md:

table

Markdown table rows are indexed using the table tag, any additional tags can be added using [[Tags]] in any of its cells. Title Description Text
This is some key The value contains a #table-tag
Another key This time without a tag
table-tag

This would render the result as

ref tag page pos title description_text tags
someref@23 table ExamplePage 23 This is some key The value contains a #table-tag table-tag
zefhemel commented 4 months ago

I love it. I was thinking of supporting this for CSV embedded in fenced code blocks already, but also doing this for markdown tables makes perfect sense.

gorootde commented 4 months ago

Glad you like it. I am going to prepare a PR. Feel free to assign this issue to me.

zefhemel commented 4 months ago

Implemented by... you!