mProjectsCode / obsidian-media-db-plugin

A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your vault.
GNU General Public License v3.0
250 stars 30 forks source link

Allow "linkification" of properties #137

Open wealthychef1 opened 7 months ago

wealthychef1 commented 7 months ago

Is your feature request related to a problem? Please describe. MediaDB fetches some properties which I'd like to convert into links For example, "author" or "director." If these are displayed as links instead of strings, then I can create notes for each of them and make cool cross-references.

Describe the solution you'd like I'd like to see a checkbox under "Property Mappings" that says "Linkify" which just turns every item in this property into a link instead of just a string. So "W.B. DuBois" becomes "[[W.B. DuBois]]"

Additional context I would use this to create tables, something I already do with Movies because I have a custom script for that which does linkify items.
Thanks!

vaughanvandyk commented 5 months ago

Hi @wealthychef1 I requested something similar in #134

wealthychef1 commented 5 months ago

Hi @wealthychef1 I requested something similar in #134

Great minds think alike.

kelszo commented 4 months ago

This is already possible todo using the recently added Templater support (#119).

Install templater and add this in the template:

<% media.writer.map(author => `[[${author}]]`).join(', ') %>

This support was recently added in the 0.7.0 version of the plugin.

vaughanvandyk commented 3 months ago

Thanks for this @kelszo -- indeed Templater is super powerful for such things. However, for those of us who don't use that plugin for anything else, it would be great if this functionality were built into MediaDB directly while it is parsing the properties.