- Search source code
- Search notes
- Search work shell scripts
the configuration is a json file that should be located as $HOME/.mysearch/config.json. if such file exists, it overrides the following default
{
"fileExtensionsPattern":
".*\\.(java|c|h|cpp|properties|xml|yaml|yml|json|html|css|js|go|txt|sql|sh|py|proto|md|jsp|jspf|csv)",
"searchDirectories": [
"$HOME/mysource"
],
"skipDirectoriesPatterns": [
".*/.git",
".*/\\.idea",
".*/target",
".*/go/bin",
".*/go/pkg"
],
"skipFilePatterns": [
".*\\.pyc",
".*\\.class",
".*/\\.exe",
".*/\\.bin",
".*/\\.obj"
],
"displayLinesBefore": 5,
"displayLinesAfter": 6
}Notes:
- skipDirectoriesPatterns MUST end without forward slash
git clone git clone https://github.com/sabag/codesearch.git
cd search
mvn clean install
./run.sh [PORT]Java 11 must be used to build and to run. default port is 8080, you can specify the port as argument to run.sh. Browse to http://localhost:8080
ver 2.1 - show N lines before and after each occurrence of the search termver 2.1 - create test with test filever 3.0 - multiple base directoriesver 3.0 - configuration json filever 3.1 - must check that view file is under one of the base directoriesver 3.2 - highlight search term in contentver 3.3 - live reload for configuration filever 4.0 - optimize search speed - send results as SSE (Server-Sent Events)added bootstrap styleshide the common path from results- ver 5.0 - optimize search speed - parallel searching (needed?)
- ver 6.0 - editor for configuration (maybe file watcher is enough?)
generate a Ascii Art banner for log startup using this Online Generator Fonts demo can be found here.