I am thinking of creating different tasks that operate on TaskPaper format in Drafts and do something with them in OmniFocus, such as “Create project in Personal”. I have some other tasks where this question applies.
You can use require and a script library file.
You could have a script step action then include actionthat action and bring in your code as a kind of library.
You could take a look at some of the parsers and API sets in the Action directory as examples of how people have built sets of functionality as what is in effect a library of functionality.
You might also want to look at the existing Omnifocus/Taskpaper group in the Action directory to ensure you are not reinventing the wheel.
Thanks, I looked at the
require in iCloud thing and it might work. I’ll also look at the action directory if there are examples of parsers, etc.
Can you rely on the required module being cached by iCloud Drive on the device?
(As usual I’m concerned with the 35,000 feet problem.)
If you can open the file in “Airplane mode”, you should be fine. I’ve never had any iCloud Drive caching issues, but a sample size of one is not proof.
Almost all of my script resides in iCloud Drive (for longer than the require has been around for Drafts ) as it means I can use whatever editor I like for editing it. Then simple function calls in the Action.