Coder Social home page Coder Social logo

search_go's Introduction

search_go

Screenshot

Build

go build main.go

Default Config

env default accepts
ROOTDIR C:\ string
MAXDEBTH 10 int
SILENT 1 bool
REGEX 1 bool

Run With Custom Config

In Powershell

$env:MAXDEBTH=10
$env:SILENT=0
$env:REGEX=1
$env:ROOTDIR='C:\'
.\main.exe

In Bash

MAXDEBTH=10 SILENT=0 REGEX=1 ROOTDIR='C:\' ./main

Example Search Term

Listing all .mp4 files using regex

^*.mp4$

Example Functions

OPEN

This example will open 1080p.mp4 inside the file explorer

-> ^*.mp4$
[1] HolidayJazz.mp4
[2] 1080p.mp4
[3] 1080p3min.mp4
[4] 1080p60.mp4
[5] 360p.mp4
[6] 480p.mp4
[7] 720p.mp4
Found 7 matches in 12ms
-> --open 2
Opening: C:\tmp\
->

COPY

This example will copy 1080p.mp4 into the folder beans

-> ^*.mp4$
[1] HolidayJazz.mp4
[2] 1080p.mp4
[3] 1080p3min.mp4
[4] 1080p60.mp4
[5] 360p.mp4
[6] 480p.mp4
[7] 720p.mp4
Found 7 matches in 12ms
-> --copy 2 ./beans
->

HELP

This example will output all available commands

-> --help
#########################
# search_go | help page #
#########################

        --open [number]         # requires a number
        --open 69               # opens the 69th file from the matched files & folders in the explorer

        --limit [number]        # requires a number
        --limit 100             # list only the first 100 matches (set to 0 if you want no limit)

        --copy [number|*]       # requires a number or *
        --copy 100 ./destfolder # copies the 100th file into the destfolder
        --copy * ./destfolder   # copies the all matched files into the destfolder

->

Benchmarking Notes

regex

BenchmarkMP4Search\/input_size_([0-9]{1,})-8[ ]{1,}[0-9][ ]{1,}([0-9]{1,}) ns\/op[ ]{1,}([0-9]{1,}) B\/op[ ]{1,}([0-9]{1,}) allocs\/op

csv

$1,$2,$3,$4

run

go test -benchmem -run=^$ -count 3 -bench ^BenchmarkMP4Search$ com/github/kirari04/search_go/benchmark

search_go's People

Contributors

kirari04 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.