https://github.com/dobatymo/desktop-search
Simple python code search
https://github.com/dobatymo/desktop-search
code-search full-text-search python
Last synced: 2 months ago
JSON representation
Simple python code search
- Host: GitHub
- URL: https://github.com/dobatymo/desktop-search
- Owner: Dobatymo
- Created: 2020-06-04T09:02:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-21T00:59:37.000Z (5 months ago)
- Last Synced: 2025-07-12T03:34:32.445Z (3 months ago)
- Topics: code-search, full-text-search, python
- Language: Python
- Homepage:
- Size: 854 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Desktop search
Simple app to search the contents of local files. At the moment only python files are supported.
## Install and run
- Install Python 3.8 or higher.
- Create a config file based on `examples/config.json.example` and save as `config.json`.### Windows
```batch
py -m pip install poetry
py -m poetry install
py -m poetry run python -m spacy download en_core_web_sm
```### Linux
```shell
python3 -m pip install poetry
python3 -m poetry install
python3 -m poetry run python -m spacy download en_core_web_sm
```### Run
- Run `py -m poetry run python wsgi.py -b` (Windows) / `poetry run python wsgi.py -b` (Linux)
- Open in your browser to index and search your files.## Purpose
Only matches full names. For example a search for `itertools` returns all files where `itertools` is imported, but not files where it is mentioned in comments.
Searching itself is super fast. The indexing step is around 5000 files per minute on my computer. It was written mostly to support refactoring when functions are renamed and other source files have to be adjusted.## Dev
- ctags could be used instead of manual lexing and tag extraction
- trigram index could be used for non-full-word/partial matching## Todo
- search comments (with select natural language)
- add more tokenizers
- index files in archives like zip files## Optional dependencies
- `pip install future-fstrings` to handle files which specify `coding: future_fstrings`