The foogle is search engine with TF-IDF ranking written in Python.
Install requirements:
python -m pip install -r requirements.txt
python foogle.py --help
First you need do this:
python foogle.py compile my_path
Will create and fill in sqlite data base and needful files.
python foogle.py find "some text"
Show what files contain phrases similar to some text. Work with set theory operations: and, or and not (or C-like syntax &, | and !)
python foogle.py find "!(Bob and Allice & Bacel) or def"
Show file without 'Bob', 'Allice' and 'Bacel' and files with word 'def'
Use typical TF-IDF ranking. Where:
TF:
IDF:
foogle:
logging_file_name: mylog.log
types:
- text*
- application/j
date_base_name: mydb.db
extention_types:
- .h
- .sh
- .doc
general_path:
Support types from mimetypes lib, watch this.