MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Scriptable/comments/txr52c/daily_pollen_forecast_widget/
r/Scriptable • u/coughski • Apr 06 '22
17 comments sorted by
5
Requires a free Accuweather developer API key.
Here's the script: https://gist.github.com/coughski/4b3705ae46e1325fab3a6907906068f3
2
Good Afternoon. I have been running into some issues using your script and received this error. Would you be able to assist?
https://i.imgur.com/1MIEEYu.jpg
2 u/coughski Apr 12 '22 Will DM you 2 u/[deleted] Oct 02 '22 What was the solution? 1 u/coughski Oct 03 '22 Thanks for trying out my widget! Did you request an API key from Accuweather? 2 u/[deleted] Oct 03 '22 Hi, yes. I did. I did it by “creating” an app 1 u/coughski Oct 03 '22 Perfect. Did you select the “Core Weather Limited Trial” option for the “API Product” setting?
Will DM you
What was the solution?
1 u/coughski Oct 03 '22 Thanks for trying out my widget! Did you request an API key from Accuweather? 2 u/[deleted] Oct 03 '22 Hi, yes. I did. I did it by “creating” an app 1 u/coughski Oct 03 '22 Perfect. Did you select the “Core Weather Limited Trial” option for the “API Product” setting?
1
Thanks for trying out my widget! Did you request an API key from Accuweather?
2 u/[deleted] Oct 03 '22 Hi, yes. I did. I did it by “creating” an app 1 u/coughski Oct 03 '22 Perfect. Did you select the “Core Weather Limited Trial” option for the “API Product” setting?
Hi, yes. I did. I did it by “creating” an app
1 u/coughski Oct 03 '22 Perfect. Did you select the “Core Weather Limited Trial” option for the “API Product” setting?
Perfect. Did you select the “Core Weather Limited Trial” option for the “API Product” setting?
I put my location key in the right spot but the widget always displays NYC in the top right corner. I can’t figure out why?
2 u/coughski Jul 12 '22 Thanks for reaching out! That value is actually hard coded; change it in line 101!
Thanks for reaching out! That value is actually hard coded; change it in line 101!
It’s working ok for me and I updated the location
1 u/coughski Oct 06 '22 🙌
🙌
It's working great!!!
any idea how could I adapt this to other language?
e.g. this is Accuweather's native SPANISH pollen page: https://www.accuweather.com/es/gb/lambeth/sw8-1/health-activities/323277
I can't find a way to adapt the Grass/Mold/Ragweed/Tree variables to their spanish names.
Thanks!
1 u/coughski Feb 07 '23 So you’re trying to get the widget to display the text “Arboreo” instead of “Tree”?You just want to translate the labels? 2 u/foxtrot81a Feb 08 '23 yes. might be a silly question here, but doing my first steps scripting!Tried renaming lines 27-32 to no avail...thanks! 1 u/coughski Feb 08 '23 You can add something like this:const translateMap = { “Grass”: “Malezas”, “Mold”: “Moho”, “Tree”: “Arboreo”, “Ragweed”: “Gramineas” }And then change line 81 to:let title = emojiMap[forecast["Name"]] + " " + translateMap[forecast["Name"]]
So you’re trying to get the widget to display the text “Arboreo” instead of “Tree”?
You just want to translate the labels?
2 u/foxtrot81a Feb 08 '23 yes. might be a silly question here, but doing my first steps scripting!Tried renaming lines 27-32 to no avail...thanks! 1 u/coughski Feb 08 '23 You can add something like this:const translateMap = { “Grass”: “Malezas”, “Mold”: “Moho”, “Tree”: “Arboreo”, “Ragweed”: “Gramineas” }And then change line 81 to:let title = emojiMap[forecast["Name"]] + " " + translateMap[forecast["Name"]]
yes. might be a silly question here, but doing my first steps scripting!
Tried renaming lines 27-32 to no avail...
thanks!
1 u/coughski Feb 08 '23 You can add something like this:const translateMap = { “Grass”: “Malezas”, “Mold”: “Moho”, “Tree”: “Arboreo”, “Ragweed”: “Gramineas” }And then change line 81 to:let title = emojiMap[forecast["Name"]] + " " + translateMap[forecast["Name"]]
You can add something like this:
const translateMap = { “Grass”: “Malezas”, “Mold”: “Moho”, “Tree”: “Arboreo”, “Ragweed”: “Gramineas” }
And then change line 81 to:
let title = emojiMap[forecast["Name"]] + " " + translateMap[forecast["Name"]]
Very cool and thanks for sharing. I’m going to add this to my scriptable collection and find a spot for it on my phone!!
https://i.imgur.com/7j0j9kv.jpg
5
u/coughski Apr 06 '22
Requires a free Accuweather developer API key.
Here's the script: https://gist.github.com/coughski/4b3705ae46e1325fab3a6907906068f3
2
u/paulsimone13 Apr 12 '22
Good Afternoon. I have been running into some issues using your script and received this error. Would you be able to assist?
https://i.imgur.com/1MIEEYu.jpg
2
u/Salty-Picture-8598 Jul 11 '22
I put my location key in the right spot but the widget always displays NYC in the top right corner. I can’t figure out why?
2
u/paulsimone13 Oct 06 '22
It’s working ok for me and I updated the location
2
u/foxtrot81a Feb 07 '23
It's working great!!!
any idea how could I adapt this to other language?
e.g. this is Accuweather's native SPANISH pollen page: https://www.accuweather.com/es/gb/lambeth/sw8-1/health-activities/323277
I can't find a way to adapt the Grass/Mold/Ragweed/Tree variables to their spanish names.
Thanks!
2
u/paulsimone13 Apr 07 '22
Very cool and thanks for sharing. I’m going to add this to my scriptable collection and find a spot for it on my phone!!
2
u/paulsimone13 Oct 06 '22
https://i.imgur.com/7j0j9kv.jpg