GithubHelp home page GithubHelp logo

aw1875 / s Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 326 KB

Search Google or DuckDuckGo directly in your terminal finely grained based on what you like. Customize the sites you want results from and more.

JavaScript 6.40% Shell 0.51% TypeScript 93.10%
nodejs search terminal-based

s's Introduction

S - Terminal Search Tool

Search Google or DuckDuckGo directly in your terminal finely grained based on what you like. Customize the sites you want results from and more.

Setup

To get S up and running, you first need to install all dependencies:

yarn install

Then, running 2 simple commands is all you need.

yarn build
yarn setup

If you get permission issues running yarn setup try running it with sudo as sudo yarn setup

Using S

After installing S, to use it all you need to do is type s [your query] in your terminal. For example:

s hello world nodejs

This will get results for "hello world nodejs" based on the config.json and display them in your terminal.

Moving in S

Although there is a controls output that tells you the movements, here is what you would need to know just in case.

j - Move down a result
k - Move up a result
n - Move to the next page of results
p - Move to the previous page of results
return or space - Open the link in your default browser
q or esc - Quit the program

Config

This package comes with a default config.json file that will be located at /etc/s/config.json once installed. You can edit this file to better suit your needs. The config has 4 sections that are customizable.

sites - An array of strings that your results will be based on
results - A number for the amount of results you want
itemsPerPage - A number for the number of items you want shown on each page
searchEngine - Either google or duckduckgo

An example config for Google would look like this:

{
  "sites": [
    "stackoverflow.com",
    "stackexchange.com"
  ],
  "results": 30,
  "itemsPerPage": 5,
  "searchEngine": "google"
}

See config.json for an example.

s's People

Contributors

aw1875 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.