willasm / obsidian-open-weather

Obsidian plugin for OpenWeather API
MIT License
44 stars 2 forks source link

Template Weather 3 option not automatically filling in when I create Daily Note #29

Closed rororow closed 3 weeks ago

rororow commented 4 weeks ago

Thank you so much for the plugin.

I am new-ish to Obsidian and was excited to implement your plugin in my Daily Note template.

I was able to set it up properly - I know this because I was, one time only, able to use the "Replace template strings" command to fill in "Weather 3", which I've placed in my template as %weather3%.

However, it doesn't replace the string automatically when I create the Daily Note, and the Open Weather commands only show up sometimes in the command palette.

I would appreciate your help in getting this working.

Thank you!

willasm commented 4 weeks ago

First check that you have excluded your template folder in the settings. If that is not set then the %weather3% string may have been removed already. Do note that the default %weather3% and %weather4% strings were designed to be used in a <div> block (See the Example.md file for a demonstration). If you want to use it in a different way you can edit it in the settings. If you still can not get it working, post a copy of your template so I can see if there are any problems in it.

Also the plugins commands will only be available while in edit mode, the commands mostly are for inserting text into the current note and that can not be done while in preview mode so the commands will not be displayed. You should see a notification stating this when you open the command button from the sidebar.

Thanks, William.

rororow commented 4 weeks ago

Hello William,

Thank you so much for the quick reply! Putting the string in a div block and excluding my templates folder worked. I'm seeing a stray "%desc" in front of the icon. Any suggestions to fix that?

Thanks!

willasm commented 4 weeks ago

Glad you got it working. "%desc" is a macro for the current weather description but it is missing the trailing "%". It should be "%desc%". Check what you have in your template.

Thanks William.

rororow commented 3 weeks ago

Hi William - I've corrected the missing % following %desc and all is now well. Thanks again for your help!

willasm commented 3 weeks ago

Glad you got it working.

Thanks, William.