How to show a weather forecast in Typst automatically?

I am in the middle of making a sort of “daily planner” with a calendar to show events and reminders, as well as a weather forecast for the day. However, I’m not sure how one would automatically get the weather forecast from an API and display it in Typst, as I have not seen this done before.
Any help or ideas is greatly appreciated as I am relatively new to Typst, and especially the scripting part of the language.

Hi. Find a service that provides an HTTP API with JSON response that you can save in a file and then generate the forecast visuals in Typst. It’ll be curl https://service.com/?city=City > weekly-forecast.json && typst c forecast.typ.

2 Likes

Thanks, will try out! <3

1 Like