Skip to content

sabag/codesearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project My Search

Features

  • Search source code
  • Search notes
  • Search work shell scripts

Configuration

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

Install

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

TODO

  • ver 2.1 - show N lines before and after each occurrence of the search term
  • ver 2.1 - create test with test file
  • ver 3.0 - multiple base directories
  • ver 3.0 - configuration json file
  • ver 3.1 - must check that view file is under one of the base directories
  • ver 3.2 - highlight search term in content
  • ver 3.3 - live reload for configuration file
  • ver 4.0 - optimize search speed - send results as SSE (Server-Sent Events)
  • added bootstrap styles
  • hide 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?)

References

SpringBoot Banner

generate a Ascii Art banner for log startup using this Online Generator Fonts demo can be found here.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors