studiowebux / obsidian-spotify-link

Obsidian.md Plugin to include the song or episode you're currently listening to in your note.
https://studiowebux.github.io/obsidian-plugins-docs/docs/category/plugin-spotify-link
MIT License
9 stars 2 forks source link

Feature Request: select file as template and create new note #14

Open starfetch opened 1 week ago

starfetch commented 1 week ago

Hi, thanks for creating this plugin, it's working great. I'm trying to use it as a way to get metadata about songs I like into Obsidian (like I do with books, films, etc), and it would be great if there was an option to select a template file instead of having to copy the entire template into the tiny textbox. Additionally, a way to create a new note directly from this template would be very handy as well (right now I append to a new note, but some templater commands do not trigger properly this way).

Thanks in advance and keep up the great work.

studiowebux commented 1 week ago

Hello, Thanks for your Feature request !

I will take a look this week and update this ticket.


The first feature I will have to take a look if I can add the feature without breaking the existing one (i think I did it to support that approach), what I have in mind is to allow to read files with a special name for example, option_name.template.md, these files will have to be store either in the vault or in the plugin directory, which one do you prefer ?

The second feature, should be easy as I did it with my other plugin.

starfetch commented 1 week ago

The first feature I will have to take a look if I can add the feature without breaking the existing one (i think I did it to support that approach), what I have in mind is to allow to read files with a special name for example, option_name.template.md, these files will have to be store either in the vault or in the plugin directory, which one do you prefer ?

My preference would be in the vault, since that's easier to edit (and I have a Templates folder already). Do you think it's possible to choose an arbitrary file as a template, as for example done by the Book Search plugin or the MediaDB plugin?

The second feature, should be easy as I did it with my other plugin.

Great to hear!

Thanks for taking the time to look into this.

studiowebux commented 1 week ago

hello again 👋

So i had free time tonight,

I created this PR : https://github.com/studiowebux/obsidian-spotify-link/pull/15#issue-2587323709 (I dont expect a code review or anything, just validate the description I wrote if it is ok for you)

if so, I will prepare a release to let you test

Thanks !

starfetch commented 1 week ago

I had a look, and only the first two paragraphs about the menu are not entirely clear to me: Does it mean that new commands are added to the command palette or not?

The rest looks good, thanks for your time!

studiowebux commented 1 week ago

@starfetch

For the menu:

TODOs:

Clarification: The menu items can be enabled/disabled in case its clutter the right click menu (the screenshot).

studiowebux commented 1 week ago

Hello !

I released v1.5.1 (you can update directly in obsidian),

let me know if it has everything and if it works as you expected.

Thanks

starfetch commented 1 week ago

Hi, creating a new note with these commands works great, thanks a ton! This will make taking note of songs so much easier. [Now it would be perfect if there was a toggle to open the new note directly after creation (sorry, feature creep, only if it's a simple addition).]

Using a template file took me a few minutes to figure out (first I didn't see the new description above the textbox), but that also works a treat. A few things that should be documented which were not immediately obvious to me:

Thank you so much for implementing this so quickly and nicely, your work is greatly appreciated.

studiowebux commented 1 week ago

Hello,

Thanks for your feedback !

TODOS:

For this one:

Using a template file took me a few minutes to figure out (first I didn't see the new description above the textbox), but that also works a treat.

Hum I added it on both field description. I can add details about it in the section above (with template options)

I didnt update the "official" documentation yet (the dedicated website)

Will try to tackle all todos this week (maybe over the weekend as well)

studiowebux commented 1 week ago

Finally that was simple.

released 1.5.2 (still have to update the official doc, will do after everything is good)

Will wait your feedback Thanks again !