Help: Need AppleScript example to simply link a filename with two web pages (and their associated titles)?

I am trying to programatically hook a series a download files with their 2 associated webpage links (download link url and about url)

For each file I have the following information – Example:

filename:      /Users/DM/Downloads/AmadeusPro_v2.8.13.dmg
downloadUrl:   https://s3.amazonaws.com/AmadeusPro2/AmadeusPro.zip
downloadTitle: Amadeus Pro 2.8.13 (2662) Beta
aboutURL:      https://www.hairersoft.com/pro.html
aboutTitle:    Amadeus Pro - The swiss army knife of sound editing

I’ve tried to use the Hookmark’s Command Line Interface (CLI) documentation to use shell out to the CLI to achieve the desired linking.


I have posted Brett on the github issue tracker as follows:

Example:

Preconditions:

cat temp.tmp
This is just a test download file

hook list -ov temp.tmp
No bookmarks

hook list -ov https://google.com
No bookmarks

Linking

hook link “[web title](https://google.com](https://google.com)” “[file title](temp.tmp)”

Linking https://google.com and /Users/dennismisener/work/Nim/temp.tmp...
Linked 1 files to /Users/dennismisener/work/Nim/temp.tmp

Results:

link list -ov temp.tmp

Bookmarks attached to /Users/dennismisener/work/Nim/temp.tmp

Title:
Path:
Address: https://google.com
---------------------

link list -ov https://google.com

Bookmarks attached to https://google.com

Title: temp.tmp
Path: /Users/dennismisener/work/Nim/temp.tmp
Address: hook://file/byJgwypqK?p=d29yay9OaW0=&n=temp%2Etmp
---------------------

Issue:

The supplied title information seems to be ignored.

  • Am I using an incorrect syntax?
  • Is there another way to specify the title information?

I was wondering if I could directly use an imbedded AppleScript API snippet to achieve the same thing (bypassing the overhead of the ruby invocation, since I have hundreds of these linkages to make).

I’ve unsuccessfully searched the forum for something to start with but didn’t find any examples with linking with title information.

Any assistance would be appreciated.