GGLConsole
GGLConsole provides you the command line interface for websearch by Google / Bing.
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
- Google: Enable Custom Search API on Cloud Console or visit https://developers.google.com/custom-search/v1/introduction and press
Get a Keybutton to get a free trial API Key(limited 100 requests/day). If you want to use your own search engine visit https://cse.google.com/cse/all to create and getcx, and set it as the value ofgoogle_cxin configuration file. (Optional) - Bing: Create Bing Search V7 on Azure Portal https://portal.azure.com/#create/Microsoft.BingSearch Level
S6is suitable for this use case. - Qiita: Create personal access token at https://qiita.com/settings/applications
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)
Metadata
Release files for gglconsole 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gglconsole-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / gglconsole-0.2.3-py3-none-any.whl
| Download URL | gglconsole-0.2.3-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00071fa22554573904c578c5298308ecb625bef6f5ad4f3ecbdace4d7879a131
|
|
BLAKE2b-256 checksum How to use checksums |
fd8bf325312089e8d84466397e0b9dcbeb770b0eb0ea6284796e8b4d339f5eed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for gglconsole 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.