Skip to content

websites_and_search_engines

The community/core/websites_and_search_engines directory contains files that allow users to quickly navigate to websites and perform searches using voice commands.

  • website.talon-list defines a list of websites, mapping short names to URLs. For example, "talon home page" maps to http://talonvoice.com. This list is used by voice commands to quickly navigate to the listed websites.

  • search_engine.talon-list defines a list of search engines, mapping short names to URLs containing the string %s. This string is later replaced with the user's search query. For example, "google" maps to https://www.google.com/search?q=%s.

  • websites_and_search_engines.talon defines the Talon voice commands for interacting with the lists defined in the .talon-list files. This file contains commands for opening websites by name, opening URLs from selected text or the clipboard, and searching using a specified search engine with a given query or using selected text or the clipboard as a query. For example, "google hunt hello world" would perform a Google search for "hello world".

  • websites_and_search_engines.py is the Python code that implements the actions used by the Talon commands. This file defines the website and search_engine lists as Talon module lists and defines functions such as open_url which opens a URL in the user's default browser, and search_with_search_engine which takes a search engine URL from the search_engine list, replaces the %s string with a URL-encoded version of the user's search query, and opens the resulting URL.