Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Merging workflows?
-
Anybody know if it would be possible to merge two workflow backups into one so I can restore to both devices and not have to go through and figure out which is on which device, which isn't, and which in-progress ones I haven't shared are still only on which device, and then share them back and forth.
If backups could be merged, somehow, that would be awesome. So anybody know any reason why that wouldn't be possible? If not, any ideas how to go about starting such a thing.
Thanks folks.
-- Charlie
-
Of course, with workflow backups, I'm referring to the files made from this workflow by Ole.
http://editorial-app.appspot.com/workflow/5707702298738688/bfOalmbTevI
-
Charlie,
Have you ever expanded one of those Editorial backup Zip files, to see what's inside them?
The contents should give you an idea of what would be involved in implementing this - and why automating it would be hard.
The files are:
Commands.edcmd
- this is a one-line JSON file, which contains a list of workflow data
- each item in the list has a description of a single workflow, including
title
,iconName
,tags
,filename
Then
- A series of files
*.wkflw
, e.g.E95A76F9-FF29-4CBA-85B1-E95000A287F3.wkflw
- each of these contains a list of
actions
for the workflow whosefilename
value matches the name of this file
- each of these contains a list of
I'm thinking that if I were to do this, I would:
- Expand the backups from the two different devices
- Use a folder file-comparison tool (e.g. Araxis Merge) to see if there are any matching pairs of file names, with identical contents
- Compare the Commands.edcmd contents to find areas of similarity.
- You might be in luck, and find that there are only a few differences to resolve by hand.
- Or you might find that the differences are huge.
- One thing to watch out for is if you have loaded the same workflow from the Workflow website on two different devices - will they have the exact same .wkflw filename, or will they get different identifiers? If different, you may need to write some code to identify workflows with the same name, to then compare their actions.
- Re comparing
Commands.edcmd
, you might find that your workflows are in different orders in the two devices, depending on the order in which you loaded them from the Workflow website - in which case, they will appear in different orders in this file - making the visual comparison harder. - If it helps, I recently created a Workflow to sort Workflows by Name - I could update that later - it should help reduce any differences due to order.
- To aid with this sort of thing, I've customised my Araxis Merge, for files of these two types, to wrap the JSON text when showing diffs - and to make any encoded Python workflows look more like Python.
I know this won't help you now, but for anyone else reading this... For all these reasons, I have found it works better to only ever change Editorial workflows on my iPad, then copy them to the iPhone via Ole's backup script mentioned in the previous comment.
Good luck!
Clare
-
I have, though I know very little about JSON. Thanks for replying. I'll look into this and the workflow-sorting workflow. Btw, if you celebrate any, happy holidays. Thanks again!