Automating text templates with date calculation/selection

I’m trying to automate creation of text files from a template, with some date calculation on a varying amount of lines/dates, and I’m wondering what the best tools for the job would be.

I imagine the workflow being something like this:

  • Trigger action (shortcuts/pythonista/editorial)
  • Select start date from IOS date picker
  • Get a list of all tuesdays for 3 months from start date
  • Select a desired number of tuesdays from list
    Result: text file in dropbox from template with a date section listing selected tuesdays

I have been experimenting with creating a Siri Shortcut and using pythonista to create the list of dates, but I’m having trouble getting pythonista to return to the shortcut (instead of just pythonista calling the shortcut from the beginning).

I have also wondered about maybe creating this workflow within editorial with a custom action and python code, but I’m struggling getting the date picker to work.

Any bright ideas on how best to achieve what I’m looking for?

1 Like

See if this is anything close to what you are after. It’s all done within Shortcuts for this example, and I think it hits all of your bullet points … but I’ve just put this one together quickly and not given it any extensive testing.

Hope it at least gives you a starting point.

1 Like

Fabulous! Thank you!

I just now managed to create shortcut using pythonista to find tuesdays, but it’s much cleaner and nicer to keep everything within shortcuts.