All source listed below is under MIT license if no LICENSE file stating different is available.
textseek
A text search tool for the terminal with ranking. It indexed files per line and allows searching in them.
Building
Ensure you have docker installed.
make
That's all!
Usage
Searching and indexing (per line) at the same time:
./ft "Harry and Ron" "harry-potter-1.txt harry-potter-2.txt harry-potter-3.txt"
Only indexing (per-line):
./ft _ "harry-potter-1.txt harry-potter-2.txt harry-potter-3.txt"
Only searching:
./ft "Harry and Ron"
Index whole files:
./ft _ -f "harry-potter-1.txt harry-potter-2.txt harry-potter-3.txt"
Remarks
The application outputs more than just JSON but that's done using stderr. The stdout is just clean JSON and thus the application output is usable for other processes.
Todo
- result limit
- register start byte
- register end byte
- chunking index lines
- chunking index chars
sqlite | |
compose.yml | |
Dockerfile | |
ft.c | |
Makefile | |
README.md |