Drafts text in a today widget?

Has anyone experimented with displaying text from a draft or a Drafts action in a today widget?

I have a “time since” action that displays a short list of important actions that I log in Drafts and the time elapsed since I last did them via a Javascript alert. While that works well enough at the moment, I’m thinking it might be even more useful to display as a widget. I also have a “Seinfeld chain / streaks” action that would be cool to render as a widget.

I was wondering whether displaying text from Drafts as a widget might be possible via Pythonista and if anyone else had already done something similar, or if anyone could suggest an alternative method, or if this is even possible in the way I’m thinking… If it’s Pythonista, I’m guessing the widget would have to get the text from Drafts via a callback, and I’m not sure how well that would work…

Thanks in advance for any pointers!

You can use the “View Draft” shortcut to preview draft contents via Shortcuts. Maybe not quite what you are going for, but maybe helpful. This takes parameters for the UUID directly in the iOS 13 beta version of Drafts.

Thanks Greg. I’ll see what I can do with this, though I’d love to find a way to display text output from an action with little to no manual triggering.

In theory I can run an action via a shortcut and display the text output of that action as an alert or a Shortcuts preview pane, or output text to a draft and go directly to that, but I think I’m essentially trying to hack together a minimal dashboard, something I can glance at every now and then to see the last time I did [whatever], or how consistently I’ve created or modified items in a specific workspace— whatever useful stats I can programmatically derive from my drafts.

Haven’t made much use of widgets before now, but I’m curious about how that might change with iPadOS and widgets on the home screen. I’ll experiment further with Pythonista and see what I can cobble together…

Would it make sense to utilise a Drafts action that you trigger on entering data into your data draft that exports it somewhere that a preferred widget could access it directly? Effectively like a traditional (old?) “save” function.

The premise is simply that if direct background access to data in Drafts isn’t viable, maybe you could copy the data to somewhere that is viable every time you update the Drafts data.

Got it. Thanks @sylumer— I’ll keep at it.