-
Notifications
You must be signed in to change notification settings - Fork 0
justnoise/source_search
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a small utility that is useful for indexing and searching medium size source code repositories (currently using it to search > 10K files). It was thrown together after reading "Regular Expression Matching with a Trigram Index or How Google Code Search Worked" by Russ Cox (no relation). I figured I could do a much shoddier job than he did but in less time. I'm fairly confident that first goal was met. To use it, first update your index_files_path in options.py. Next, index your source code directory with: python source_search.py -i /path/to/sourcetree_1 /path/to/sourcetree_n To search your sandbox simply enter the search terms: python source_search.py 'search string' Multiple word searches should be enclosed in quotes otherwise multiple spaces between words are interpreted as a single space. Wildcards (*) are accepted and used in their traditional globbing sense however true regular expressions aren't implemented Wildcard example: python source_search.py numto*interval will return matches of numtodsinterval and numtoyminterval ## Related Work If available, git grep is a much better alternative.
About
A tiny program for indexing and searching source code trees
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published