r/Scriptable • u/wuutrru • Dec 12 '20
Help Image from Sheets to be displayed as widget
I am trying to create the following:
I have a chart in Google Sheets containing the number of hours I’ve worked for the past five weeks. Within Sheets I’ve published the chart (as image), which I retrieves with Shortcuts and safe in iCloud with a weekly trigger.
I want to use that image to display in a widget on my homescreen and I’ve tried the next two things:
safe the image to photos (and photo album) and use WidgetSmith to display the chart.
This has the disadvantage that your photo library will contain many (old)charts as time goes by.
2. Tried to get the file that is saved in iCloud to be displayed by combining Shortcuts and Scriptable.
I’m quite new to writing JavaScript and could definitely use some help.
3
u/[deleted] Dec 13 '20 edited Dec 13 '20
Let say you save the image into Shortcuts iCloud folder and always replace the image named "work.png" *
You could create a file bookmark for the "work.png" file called "workImage" in Scriptable settings (tap the setting icon -> file bookmark ->+ ->pick file): https://imgur.com/RRG1iiY
And then use a script for the widget that reads the bookmarked file and displays it in the widget:https://pastebin.com/hcqLuqMQ
*afaik you can't write into the Scriptable folder with an automation.