lib/hook/hookapp.rb
# Get all known bookmarks. Return array of bookmark hashes.
Get all known bookmarks. Return array of bookmark hashes.
Get all known bookmarks . Return array of bookmark hashes .
def all_bookmarks
    `osascript <<'APPLESCRIPT'
      tell application "Hook"
        set _marks to every bookmark
        set _out to {}
        repeat with _hook in _marks
          set _out to _out & (name of _hook & "||" & address of _hook & "||" & path of _hook)
        end repeat
        set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "^^"}
        set _output to _out as string
        set AppleScript's text item delimiters to astid
        return _output
      end tell
    APPLESCRIPT`.strip.split_hooks
  end
def all_bookmarks ` osascript <<'APPLESCRIPT'
      tell application "Hook"
        set _marks to every bookmark
        set _out to {}
        repeat with _hook in _marks
          set _out to _out & (name of _hook & "||" & address of _hook & "||" & path of _hook)
        end repeat
        set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "^^"}
        set _output to _out as string
        set AppleScript's text item delimiters to astid
        return _output
      end tell
    APPLESCRIPT ` . strip . split_hooks end
Get all known bookmarks.
Get all known bookmarks .