Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

TrevorDArcyEvans/AstroGrep.Core

 
 

Repository files navigation

AstroGrep.Core

screenshot

This is a fork of AstroGrep.Core, which, in turn, is a fork of the original AstroGrep repo.

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

Additional work

  • ported to .NET Core 6
  • removed all Windows specific code
    • removed all encoding detection
  • ported to Linux
  • added portable UI

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;

Prerequisites

  • .NET Core 6

Getting started

# clone repository
git clone https://github.com/TrevorDArcyEvans/AstroGrep.Core.git

# build solution
cd AstroGrep.Core
dotnet build

# start UI
cd AstroGrep.Core.UI
dotnet run

Further work

  • Linux desktop UI
  • reinstate cross platform encoding detection
  • integrate Avalon.Edit
  • support excluding files + directories
  • persist/restore settings

Acknowledgements

About

C# implementation of AstroGrep for Linux

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C# 100.0%