Skip to main content

GGLConsole provides you the command line interface for websearch by Google / Bing.

Project description

GGLConsole

GGLConsole provides you the command line interface for websearch by Google / Bing.

🇯🇵日本語のREADMEはこちら

Web search on console

Installation

$ pip install gglconsole

Browser mode

Input the keywords you want to search as arguments of ggl command. The result will be shown in browser.

$ ggl python line bot

If you want to search by Bing or Qiita, use bing or qiita command.

$ bing python line bot
$ qiita python line bot

Console mode

To enable console mode, configure API credentials by calling with --console.

$ ggl --console
Google API key: [YOUR API KEY]

Replace ggl to bing or qiita to configure other services. Use --browser if you want to switch back to browser mode.

After configuration, input keywords as same as browser mode.

$ ggl python line bot
  • 10 results will be shown on console.
  • Input enter if you want to retrieve more results.
  • Input index number(s) to show the website on browser. You can input multiple indexes devided by space.

How to get API keys

Configuration

Use --config to show the path to configuration file. Open this file with your text editor to change configuration.

$ ggl --config
  • search_engine_class: Name of default search engine (GoogleEngine)
  • prompt: Prompt message to input keywords (何について調べますか?🐬)
  • show_banner: Show banner or not (true)
  • config_command: Option to show the path to configuration file (--config)
  • exit_on_end: Exit after process 1 query (false)
  • exit_on_ctrlc: Exit by Ctrl+C (true)
  • exit_commands: Commands to exit ([exit, quit, \q])
  • index_delimiter: Delimiter of index numbers (" ")
  • count: Numbers of results to show by 1 query. (10)
  • browser_target: The window to show the website. 0:default | 1:new window | 2:new tab (0)
  • use_api: False for browser mode, True for console mode. (false)
  • title_style: rich styles for title of search result. (bold bright_white)
  • link_style: rich styles for link of search result. (blue underline)
  • snippet_style: rich styles for snippet of search result. (white)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gglconsole-0.2.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file gglconsole-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: gglconsole-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

File hashes

Hashes for gglconsole-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 00071fa22554573904c578c5298308ecb625bef6f5ad4f3ecbdace4d7879a131
MD5 cc198494c560c419842a47c0726fab4b
BLAKE2b-256 fd8bf325312089e8d84466397e0b9dcbeb770b0eb0ea6284796e8b4d339f5eed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page