Giter Site home page Giter Site logo

shovel-search's Introduction

scoop-search

Fast scoop search drop-in replacement 🚀 Forked from scoop-search by shilangyu

Installation

scoop install https://raw.githubusercontent.com/voidei/shovel-search/master/shovel-search.json

Hook

Instead of using shovel-search.exe <term> you can setup a hook that will run shovel-search.exe whenever you use native shovel search

Add this to your Powershell profile (usually located at $PROFILE)

Invoke-Expression (&shovel-search --hook)

Features

Returns identical results as scoop search, though it doesn't behave the same as scoop search, so if that's what you want, please check upstream.

Deviations from scoop search

Regex Searching

Uses Golang regex, so negative/positive lookahead/lookbehind supported.

❯ scoop-search /balls?/
'extras' bucket:
    monero (0.17.3.2) --> includes 'monero-blockchain-blackball'
'games' bucket:
    neverball (1.6.0)
    paintball2 (build045)
'main' bucket:
    monero-cli (0.17.3.2) --> includes 'monero-blockchain-blackball'

'nonportable' bucket:
    virtualbox52-np (5.2.44) --> includes 'VBoxBalloonCtrl.exe'
    virtualbox-np (6.1.34) --> includes 'VBoxBalloonCtrl.exe'
    virtualbox-with-extension-pack-np (6.1.34) --> includes 'VBoxBalloonCtrl.exe'
'retools' bucket:
    dynamorio (9.0.1) --> includes 'balloon.exe'

Online searching

❯ scoop-search noto
Results from other buckets...
'dodorz_scoop' bucket (https://github.com/dodorz/scoop):
    Noto-Font (2017.10.25)
    Noto-Mono-Font (2017.10.25)
    Noto-Serif-Font (2017.10.25)
    Noto-Sans-Font (2017.10.25)
'ShuguangSun_sgs-scoop-bucket' bucket (https://github.com/ShuguangSun/sgs-scoop-bucket):
    Noto-CJK-Mega-OTC (20190603)
'KnotUntied_scoop-fonts' bucket (https://github.com/KnotUntied/scoop-fonts):
    notomusic (2.000)
    notosansmath (2.001)
    notosansmono (2.006)
'nerd-fonts' bucket (install using 'scoop install nerd-fonts/<app>'):
    Noto-CJK-Mega-OTC (20190603)
    Noto-NF (2.1.0)
    Noto-NF-Mono (2.1.0)
    Source-Han-Noto-CJK-Ultra-OTC (20190603)

Benchmarks

Done with hyperfine. shovel-search is on average 50 times faster.

TODO - replace this w/ my own shovel-search results, so i'm not ripping off the original author's scoop-search results

❯ hyperfine --warmup 1 'scoop-search google' 'scoop search google'
Benchmark #1: scoop-search google
  Time (mean ± σ):      76.1 ms ±   1.9 ms    [User: 0.8 ms, System: 5.8 ms]
  Range (min … max):    73.4 ms …  82.7 ms    37 runs

Benchmark #2: scoop search google
  Time (mean ± σ):      3.910 s ±  0.015 s    [User: 1.4 ms, System: 7.9 ms]
  Range (min … max):    3.888 s …  3.928 s    10 runs

Summary
  'scoop-search google' ran
   51.37 ± 1.31 times faster than 'scoop search google'

run on AMD Ryzen 5 3600 @ 3.6GHz

Building

To enable online lookup, you'll need to link an API key:

# How you find this API key is up to you
go build -ldflags="-X 'main.shovelSearchApiKey=something'"

shovel-search's People

Contributors

dependabot[bot] avatar shilangyu avatar v1nh1shungry avatar voidei 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.