-
|
I thought I'd check if anyone more recently successfully been able to assign a Pythonista script as a "Today Widget"... ? https://omz-software.com/pythonista/docs/ios/appex.html On my iOS 18.3.2 (iPhone 13 mini) I've been trying the following steps
Anyone have successfully used this feature more recently, or have any tips or advice? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 14 replies
-
|
Support for legacy "Today widgets" has been removed in iOS 18, so this feature doesn't work anymore, unless you're on an old version. To be honest, it's not that big of a loss. The memory limitations made this pretty unreliable in most cases. |
Beta Was this translation helpful? Give feedback.
-
|
Personally, I use Scriptable app to create widgets, either in Today view or in Home Screen. |
Beta Was this translation helpful? Give feedback.
-
|
You could create a shortcut automation which be executed immediately (without confirmation) each day at 00:00, computes the number of days remaining, rewrites a Note always with same name. Edit: This does not work, the shortcut can't update a note... Edit: I think I found the solution: use the Photos widget pointing to a particular album with only one photo. |
Beta Was this translation helpful? Give feedback.
-
|
Ok, I've tested the use of a Photos widget asking to display a particular album (here, named "test").
As an example, Pythonista inline script used is: import io def save_image_to_album(album_name): save_image_to_album('Test') |
Beta Was this translation helpful? Give feedback.
-
|
Finally, I don't like my previous solution, due to two limitations of Photos app:
The solution I prefer and which is functional is:
As Pythonista code, this is a sample: from objc_util import * path = os.path.expanduser("~/Documents/image.jpg") with ui.ImageContext(100, 100) as ctx: func = c.UIImageJPEGRepresentation The JS code is: log(path) // === Chargement de l'image === // Si le fichier n'est pas encore téléchargé depuis iCloud const image = fm.readImage(path); // === Création du widget === // Optionnel : date de rafraîchissement // === Affichage === Hoping this solution could help you. A Pythonista code can be run in a shortcut in background, that will say without starting the Pythonista app in foreground but in this case, some statements are not allowed, no way no know which ones by advance but if it is not ok, you will get a message. The Scriptable widget has to be configured after installation by choosing the JS script you want to run. |
Beta Was this translation helpful? Give feedback.
-
|
The new beta of Pythonista Lab (build 8) includes a simple homescreen widget that is able to show a text or image file. It's pretty basic, but perhaps still useful for simple things, like showing some status or an image that you want to update from a script. |
Beta Was this translation helpful? Give feedback.
-
|
Left, Scriptable widget |
Beta Was this translation helpful? Give feedback.




Thanks for the answer 👍
The use-case being a small widget display a simple "count down" (e.g. X days left to a certain date) - but there might be other strategies to achieve this.. (I'll think about this)😇