I’ve just finished a workflow to aid my research. It uses Alfred and AppleScript to provide shortcuts for creating and associating a markdown file with a PDF. I’ve taken some steps to avoid cluttering the place up; the notes are created in a subgroup. One note of warning: it uses the URL attribute to make the PDF → markdown association; so, if you are already using the URL attribute, be warned, it will blow it away. It also provides shortcuts to specialised viewers (which you should change/delete or ignore ) and accessing the note. Here is the link:
If you don’t use Alfred but KM, Launchbar or something else you could modify it without too much difficulty. All the logic is in AppleScript. The workflow itself is just a zip archive so it should be easy to take a look at what it does.
This error indicates that you don’t have a PDF file selected but should. I believe the logic is correct for this.
Hmmmm, I’m not sure I mentioned this (there is a lot going on here ), the actions—all but dn— have an Arg and Var which adds environment variables for the viewer, file type and file extension so the script know what it should be doing. You will need to modify the viewer for something sane on your system. The script will use something like```
do shell command “open -a “$viewer”…”
Over here "dme" performs no action -- I would expect it to open my macOS-configured default markdown editor, SublimeTest. Perhaps some instruction is needed for configuration?
I'll make it use the system default viewer, rather than specifying, as [i]dn[/i] does. It requires an extra check but it should be simple enough.
I also found that the keywords conflict with others that Alfred knows about, so users might be advised to modify the keywords before using the work flow.
Oh, well I'll let users change the keywords for themselves if there are conflicts.
I’ve changed a couple of things: use default applications for dp (PDF) and dm (markdown), improved the error message when the wrong file type is selected and added a bunch do notes and a bit more to the “About this workflow”.
Nothing very big but should be a lot easier to work out how to use and alter it.
Sorry, didn’t mean to be condescending, but I’d need more to go on if I can figure out why you’re seeing this as a problem. Would you be able to copy the record into an empty database, confirm the behaviour is still borked, and send me a copy of the DB; it seems like the easiest way for me to reproduce the issue.
This error message:
should only happen if the type is wrong in DNtp, if it fails this check:
if kind of mSelection = "PDF+Text" then
That would suggest that the record doesn’t have the correct type