willasm / obsidian-open-weather

Obsidian plugin for OpenWeather API
MIT License
47 stars 3 forks source link

Feature suggestion to insert static text of weather when calling template plugins #9

Closed kickTiger closed 1 year ago

kickTiger commented 1 year ago

I want to include weather information as static text in my diary, which was created using a template plugin.

The plugin currently uses dynamic syntax like "<% tp.date.now("YYYY-MM-DD", 0)%>" to display the current date, but it doesn't support dynamic weather data.

Therefore, I'm wondering if it would be possible to introduce a new syntax that allows me to add static weather text to the generated template.

willasm commented 1 year ago

That ability already exists, just add the following to your templates for static weather...

You can place the following strings in your templates and when creating a new document using the template, they will automatically be replaced with the corresponding weather strings.

You can customize the weather string formats in the plugins settings.

If want dynamic weather in your templates that is a bit more involved. Have a look at the file EXAMPLE.md for details.

kickTiger commented 1 year ago

Thank you so much for your reply. Please forgive my carelessness for not reading the document carefully. This is an excellent plugin, and I have already recommended it on my blog

willasm commented 1 year ago

Thank you very much, have a great day.