Giter Site home page Giter Site logo

golaf's Introduction

GOLAF

GO Local Alignment Fuzzy finder

Fuzzy word/text finder using Smith-Waterman algorithm for finding matches.

TEST Software License

golaf.mov

Setup

Make sure go is installed

From within the base directory of this repository run following commands

git clone https://github.com/gwirn/golaf.git
cd golaf/src
go build -o golaf

After running the commands above, on unix systems you can either do mv golaf /usr/bin or run echo 'alias golaf="/PATH/TO/GOLAF"' >> ~/.bashrc (or ~/.zshrc depending on your shell) in order to make GOLAF easier accessible.

Usage

Basic search can be done with golaf [PATTERN] [FILE | STDIN] to search in files or in stdin.

The search can also be performed reading from StdIn with e.g. cat [FILE | STDIN] | golaf [PATTERN]

In order to fuzzy find files or directories by their name but not their content -type has to be set to n.

To search trough all directories starting in a given directory use the -recursive argument (this can be used for file content and for file/directory search).

Possible optional argument

SYNOPSIS golaf [-bin] [-color] [-gapp] [-match] [-mmp] [-quality] [-recH] [-recursive] [-type] [pattern] [file ...]
  -bin
        include binary files in the search
  -color string
        color option for highlighting the found results- options: [ red green yellow blue purple cyan white ] (default "green")
  -gapp int
        gap penalty [NEGATIVE] (default -2)
  -match int
        score for a match [POSITIVE] (default 3)
  -mmp int
        mismatch penalty [NEGATIVE] (default -3)
  -quality int
        percentage of the pattern that have to match to be seen as match (default 75)
  -recH
        include hidden files in the search
  -recursive string
        root directory for recursively searching through all files (default ".")
  -type string
        Search type
        c - search in file content
        n - search for files and directories (default "c")

golaf's People

Contributors

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