[go: up one dir, main page]

Skip to content

glendsoza/goaround

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Around : A tool to Query stackoverflow via terminal

Demo

Overview

Go around uses the stackoverflow API to get the answers for the given query and display them in terminal.

Installation

Download the latest binary corresponding to your platform from releases page

Usage

Querying the API directly

./goaround search "<your query>"
./goaround search "Python upper case a string"
export STACKOVERFLOW_APP_KEY="<your app key>"
export STACKOVERFLOW_PAGE_SIZE=50
./goaround search "<your query>"
export STACKOVERFLOW_APP_KEY="<your app key>"
export STACKOVERFLOW_PAGE_SIZE=50
./goaround search "Python upper case a string"

To get more accurate results you can pass the tags as comma separated values, results containing at least one of the tags will be shown

./goaround search "<your query>" -t "<comma seperated values>"
./goaround search "Python upper case a string" -t "python,python3"

Using goaround as wrapper to run other programs (currently only supports go and python)

goaround can be used to capture the Stderr of other porgrams and query the stackoverflow API with the erorr generated and display the results.

./goaround command "<your command>"
./goaround command "go run main.go"
./goaround command "python main.py"

Few things to note while using goaround as wrapper:

  • Stdout of the command will be displayed in the terminal in real time
  • Only the error pushed to Stderr will be used to query the stackoverflow API

Navigating through the results

  • In questions screen use the Mouse Scroll or Arrow Keys to go up and down
  • Use the Enter key to open the answer
  • Use the Backspace key to go back from answers to the questions screen
  • Use the Ctrl + c key to exit the application
  • Hot keys with special function in each screen will be displayed on the bottom of the screen

Configuration

Following environment can be used to configure the tool.

Name Required Default Description
STACKOVERFLOW_APP_KEY No - There is a limit on the number of calls that can be made to the stackoverflow api, by default 300 requests can be made per day, by providing API key this can be increased to 10000 requests per day. App can be registered here to get the App key
STACKOVERFLOW_PAGE_SIZE No 25 Number of questions displayed in the terminal. By default its 25 and can be set upto 100

Contributing

Following Features are planned to be added in the future but any help is welcome!

  • Make results more accurate and relevant
  • Provide button to copy the code from the answers to the clipboard