Skip to content

Conversation

@thekid
Copy link
Owner

@thekid thekid commented Dec 31, 2024

THis pull request fetches the weather from OpenMeteo and displays it below the date and locations for each entry:

Screenshot

Requirements

For the OpenMeteo API to produce correct results, contents must have a timezone set. This can be done by adding the Olson timezone name behind the date in the *.md files. In the following example, the timezone is Asia/Muscat:

title: "Wadi Dayqah-Stausee"
date: 2024-11-24 12:30 Asia/Muscat
location: {name: "Wadi Dayqah, Qurayyat, Oman", link: "https://maps.app.goo.gl/Norm7ue7ejTXQkGY7"}

Icons

The icons in use are from https://basmilius.github.io/weather-icons/, which provides them MIT-licensed. They are bundled in src/main/webapp/static/weather using the following command line:

#!/bin/sh

used=src/main/handlebars/partials/weather.handlebars
source=https://basmilius.github.io/weather-icons/production/fill/all
target=src/main/webapp/static/weather

for icon in $(grep -Eo "icon: '[^']+'" $used | cut -d "'" -f 2 | sort | uniq) ; do 
  curl $source/$icon.svg > $target/$icon.svg
done

@thekid thekid merged commit 6d3a91b into main Dec 31, 2024
13 checks passed
@thekid thekid deleted the feature/aggregate-weather branch December 31, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant