Create Skim/Hook Compatible Deep Links Using X & Y Coordinates + Standard Filepath

I’ve been using Obsidian along with a few Zotero-related plugins extensively.

One of these plugins extracts all highlights and comments from a designated PDF stored in Zotero to a new note in Obsidian. One of the templating options is for the extracted highlights to include a link to the source PDF.

By default, these are links merely to the PDF file. But I would prefer that they instead be deep links to the specific extracted highlight.

The Obsidian plugin on which I am relying to extract annotations can pull up an X coordinate, Y coordinate, page number, and conventional file path for the target PDF. And you can include whatever fixed portions of a URL you wish around this variables—e.g. hook:///file/[x coordinate].pdf or something like that (this is merely an example of how fixed elements and variables can be combined, not my idea of a URL that should actually function).

Is there a way I could use these template variables to generate Hook/Skim compatible deep links, even if those links are somewhat less robust than the more persistent filepaths generated by hook?

For reference, here are the variables I can use to generate URL’s from the relevant Obsidian Plugin—

  • {{}} - This pulls the page number of the designated annotation
  • {{annot.x}} - This pulls an x coordinate for the designated annotation
  • {{annot.y}} - This pulls a y coordinate for the designated annotation
  • {{annot.attachment.path}} - This pulls the standard file:/// path for the underlying PDF. You can also use replace functions to URL encode this if needed.

Any ideas on how I might use these variables to auto-generate Hook- & Skim-compatible deep links? For reference, it would be perfectly adequate for me for the auto-generated link to merely open to the correct page of the PDF.

The difficulty I’m having is that the links must be generated without Hook (because I’m relying on the templated export options with the relevant Obsidian/Zotero plugin), yet must be openable by Hook & Skim.