Metadata extraction from the frontmatter

Hi, community!

I work with a lot of scholarly communication entities (conference presentations, research articles, etc.). Recently, I needed a fast „something” to extract the metadata from the note frontmatter into something more suitable to prep it as ingest in other data aggregators. Besides the Database Folder plugin, I have not found a useful instrument to extract and transform the YAML frontmatter into JSON or CSV. So, I have put a little script that does the very bit, and I hope it will be of use to you all knowledge workers out there. You find it here: https://github.com/kosson/obsidian-metadata-extractor.

Thank you all for everything I have learned in the past three years. I felt it was time to give a little something back?!

3 Likes

Sorry for going off-topic, but could you explain what exactly you need this for? I’m curious to understand the context.

I have a lot of data as such bibliographic-datasets/SWIB at main · kosson/bibliographic-datasets · GitHub. It is useful for me to collect on my careful curation of data using Obsidian. On short, it is useful to export as CSV or JSON as a prime step towards transforming it in RIS format (GitHub - kosson/csv-to-ris: This script maps a CSV bibliographic record set to a RIS bibliographic record set.) and import it in Zotero. And this is just a small use case.

This Obsidian-Table-to-CSV plugin does this. There are options in the plugin settings for export filename and delimiters. The plugin works in Reading view only and processes the first table encountered in a note.

And here is an example of the dataview (enclose this in a codeblock) that extracts the yaml frontmatter (properties) from notes.

Caution should be used if you have a large number of files, it will quickly consume memory: note the limit 50.

TABLE WITHOUT ID "[[" + string(file.name) + "]]" as "",
file.frontmatter
sort file.mtime desc
limit 50
1 Like