My collection of silverbullet-libraries

Because @malys brought to my attention that this is the official way to share/distribute libraries in SilverBullet.

Here is my collection of silverbullet-libraries-repo of useful widgets, functions & styles.

Currently there are only a few ones, but in the future I might upload more.

Available libraries

You will also find at the end of each library the URL to the corresponding discussions.

11 Likes

Added a Weather Widget for OpenWeatherMaps to my silverbullet-libraries

You will need a free OWM API_KEY for it to work, but I found it more reliable than other free weather API’s.

I think I over engineered the functions a little with three different slash commands.

Feel free to try it and leave your opinions below.

2 Likes

Better add a space _ after :globe_with_meridians: ? or use :globe_showing_americas: ?

and %s %s%s%s :

local owm_weather = string.format("🌡️%.1f°C 💧%d%% 🍃%s%.0f km/h %s%s ℹ️%s 🌎%s,%s", owm.temp, owm.hum, owm.wdir, owm.wind, owm.icon, owm.cond, os.date("%H:%M", owm.timestamp), owm.city, owm.country )

can you send a screenshot how it looks on your display?

because on mine without space and with the “,” look the better imho:
Current:

image

your proposal:
image

and regarding the globe emoji, i didn’t wanted to be exclusive (and let the other half of the planet unrepresented :stuck_out_tongue: )
:globe_showing_americas: :globe_showing_asia_australia: :globe_showing_europe_africa:

that’s why i chose the more general & neutral globe:
:globe_with_meridians:

Oh, maybe that’s font-related?
About :globe_with_meridians:, it is indeed better to choose :globe_with_meridians: interms of eleminating the ambiguity.

before:
image
after:
image

Not a big problem, some personal tweaking is ok.

yeah that looks definitely font related.

about the tweaking: i try to make the libraries updatable, so you don’t have to change anything inside the library, but that gave me an idea to cook up something. Maybe i could add some config.set options for the format too, so you can chose what is visible. I have something like this in mind:

temp = true,
hum = false,
wind = true,
last_cache = true,
location = false,
custom_emojis = {“:thermometer:”,“:droplet:”,“:leaf_fluttering_in_wind:”,“:information_source:”,“:globe_with_meridians:”}

because not everybody wants to know the windspeed, last_cache time or humidity. this could make it much more customizable, and aligned with personal preferences.

1 Like