I'm trying to make my work more general (and portable):
I have a simple workflow that triggers on the keyword "metro". When running, it simply opens a PDF file of the metro map. It would be convenient if I could put the PDF file in the workflow folder and reference it directly from the plist...
Just using the UI, the plist fragment looks like this:
<string>metro</string> <key>objects</key> <array> <dict> <key>config</key> <dict> <key>sourcefile</key> <string>~/Dropbox/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.C1A446CC-846E-4FB1-A984-291F4CCAC3CC/metro-map.pdf</string> </dict> <key>type</key> <string>alfred.workflow.action.openfile</string> <key>uid</key> <string>BF894521-D004-4258-AD1C-3E8AFD4249A5</string> <key>version</key> <integer>1</integer> </dict>...
The workflow doesn't seem to accept a relative path from the workflow folder as a "sourcefile" value.
Is there a simple way of bundling the PDF (or other file resources I want to open) so that they can be shipped with the workflow?
Is this the right way to do it? - (what might be a better way?)