ttscoff / hookapp

MIT License
89 stars 4 forks source link

How to I supply hookmark title information when using the CLI linking #9

Open DAMisener opened 9 months ago

DAMisener commented 9 months ago

Following example:

Preconditions:

cat temp.tmp This is just a test

hook list -ov temp.tmp No bookmarks

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

Linking

hook link "[web title](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
---------------------

The supplied title information seems to be ignored. Am I using an incorrect syntax? Is there another way to specify the title information?

ttscoff commented 9 months ago

The hook script doesn't accept a title, it displays the title that Hookmark gives your link. You can't assign the title directly. Might be something to consider for a future version.

DAMisener commented 9 months ago

Thanks for the reply.

Re: "You can't assign the title directly. Might be something to consider for a future version”

This implies is should be possible :-) … Any hints on possible existing what in the current AppleScript API to help achieve this end?
I took a quick Look and didn’t see anything t hat I could use :-(

Also is there any known way to delete a Hookmark entry after all its links have been deleted via: deleteAllHooks on specified entry? I hate leaving orphaned entries in the database.

BTW: Thanks again for the HoudaSpot coupon.

Dennis Misener, you scored a coupon for HoudahSpot in the BrettTerpstra.com http://brettterpstra.com/ giveaway:

As always… I remain a great fan of your work.