cask "hookmark" do version "6.4.1,2024,10" sha256 "84261f5980993babd8353ed8766a92472c05accc242a81690389e7628a0577ac" url "https://hookproductivity.com/wp-content/uploads/#{version.csv.second}/#{version.csv.third}/Hookmark-app-#{version.csv.first}.dmg_.zip", user_agent: :fake name "Hook" desc "Link and retrieve key information" homepage "https://hookproductivity.com/" livecheck do url "https://hookproductivity.com/download" regex(%r{href=.*?/(\d+)/(\d+)/Hookmark[._-]app[._-]\v?(\d+(?:\.\d+)+)\.dmg[_-]?\.zip}i) strategy :page_match do |page, regex| page.scan(regex).map { |match| "#{match[2]},#{match[0]},#{match[1]}" } end end auto_updates true depends_on macos: ">= :high_sierra" app "Hookmark.app" uninstall launchctl: "com.cogsciapps.hookautolaunchhelper", quit: "com.cogsciapps.hook" zap trash: [ "~/Library/Application Support/com.cogsciapps.hook", "~/Library/Caches/com.cogsciapps.hook", "~/Library/HTTPStorages/com.cogsciapps.hook", "~/Library/Logs/com.cogsciapps.hook", "~/Library/Preferences/com.cogsciapps.hook.plist", "~/Library/WebKit/com.cogsciapps.hook", ] end