asherber / AstroGrep.Core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AstroGrep.Core

This started out as a fork of joshball's copy of the AstroGrep repo. On 2023-10-13, I rebased things on the actual SVN repo, so I can keep it more up to date.

AstroGrep is a nice Windows grep utility, good speed and customizability. The app includes one assembly that is responsible for the actual searching. I wanted to be able to use just that functionality, so I pulled out that code and refactored a bit to remove references to other parts of the solution. I also renamed the assembly from libAstroGrep.dll to AstroGrep.Core.dll.

Here's a sample usage:

var searchSpec = new SearchSpec()
{
    StartDirectories = new List<string>() { @"c:\some\dir" },    
    SearchText = "fizzbin",
};

var filterSpec = new FileFilterSpec()
{
    FileFilter = "*.txt"
};

var grep = new Grep(searchSpec, filterSpec);
grep.Execute();
var matchResults = grep.MatchResults;

SVN config

Wiring up the SVN repo has to be done locally.

  1. Define the remote branch in .git/config

    [svn-remote "upstream"]
    	url = https://svn.code.sf.net/p/astrogrep/code/trunk
    	fetch = :refs/remotes/git-svn-upstream
    
  2. Import the SVN branch

    git svn fetch upstream
    
  3. Create local branch

    git checkout -b upstream refs/remotes/git-svn-upstream
    
  4. Update

    git svn rebase
    

About

License:GNU General Public License v2.0


Languages

Language:C# 99.6%Language:C 0.4%