lib/hook/hookapp.rb
# Create a bookmark from specified title and url and copy to the clipboard.
Create a bookmark from specified title and url and copy to the clipboard.
Create a bookmark from specified title and url and copy to the clipboard .
def copy_bookmark(title, url, opts)
    raise "No URL found" if url.empty?
    title = title.empty? ? 'No title' : title
    output = opts[:markdown] ? "[#{title}](#{url})" : url
    output.clip
    %(Copied #{opts[:markdown] ? 'Markdown link' : 'Hook URL'} for '#{title}' to clipboard)
  end
def copy_bookmark ( title , url , opts ) raise "No URL found" if url . empty? title = title . empty? ? 'No title' : title output = opts [ :markdown ] ? "[#{title}](#{url})" : url output . clip %(Copied #{opts[:markdown] ? 'Markdown link' : 'Hook URL'} for '#{title}' to clipboard) end
Create a bookmark from specified title and url and copy to the clipboard.
Create a bookmark from specified title and url and copy to the clipboard .
title
<not_specific>
url
<not_specific>
opts
<not_specific>