Vector-based grep tool
Project description
#+title: Vector-Grep
Sync your DB to a vector DB and perform queries.
* Installation
Install the published package with [[https://pip.pypa.io/en/stable/][pip]]:
#+begin_src shell
pip install vgrep
#+end_src
To build and install locally:
#+begin_src shell
python -m build
pip install dist/vgrep-*.whl
#+end_src
* Publishing
Releases are published to [[https://pypi.org/][PyPI]] automatically via GitHub Actions when a
GitHub release is created. Configure the repository with a
``PYPI_API_TOKEN`` secret and the workflow will build and upload the
distribution for you.
* Usage
** Command line
Sync the database with tracked folders or search for text:
#+begin_src shell
vgrep /path/to/dir --sync --match '*.org'
vgrep /path/to/dir --query "search text" --match "*.org"
#+end_src
** Library
Interact with the index programmatically using the ``Manager``:
#+begin_src python
from pathlib import Path
from vgrep.manager import Manager
mgr = Manager(Path("/my/notes"), file_match=lambda p: p.suffix == ".org")
mgr.sync()
results = mgr.query("needle")
#+end_src
* Development
Install the dependencies
#+begin_src shell
pip install -r requirements.txt
#+end_src
Run the tests with:
#+begin_src shell
pytest
#+end_src
Install the package in editable mode so Emacs/Elpy can discover the modules:
#+begin_src shell
pip install -e .
#+end_src
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vgrep-0.1.4.tar.gz.
File metadata
- Download URL: vgrep-0.1.4.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7fdd40b517af080f2f21f7d2f7ec5b58b416ef1a7ace5c1a10787fc49afc58a
|
|
| MD5 |
bc001c7653a45c13ebf16545f184f248
|
|
| BLAKE2b-256 |
681ba485b50743170891cc0811c27d21f02d3e39b827dbc621443de9088a36b9
|
Provenance
The following attestation bundles were made for vgrep-0.1.4.tar.gz:
Publisher:
publish.yml on pierrel/vgrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vgrep-0.1.4.tar.gz -
Subject digest:
d7fdd40b517af080f2f21f7d2f7ec5b58b416ef1a7ace5c1a10787fc49afc58a - Sigstore transparency entry: 450824780
- Sigstore integration time:
-
Permalink:
pierrel/vgrep@994b2742d031cdd1b43276b157b0447fe5ad67a7 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/pierrel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@994b2742d031cdd1b43276b157b0447fe5ad67a7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file vgrep-0.1.4-py3-none-any.whl.
File metadata
- Download URL: vgrep-0.1.4-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eb2340c83bdd89f75c927f982396ba5fb6b38ca4b2c9d42c1658687c1c9757b
|
|
| MD5 |
47083ae09a3d2a0c80d77579078e13b9
|
|
| BLAKE2b-256 |
5b8d9756e95c63b4909df19a32031d9c0acc7479bc549f30d255f4ee25029d28
|
Provenance
The following attestation bundles were made for vgrep-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on pierrel/vgrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vgrep-0.1.4-py3-none-any.whl -
Subject digest:
6eb2340c83bdd89f75c927f982396ba5fb6b38ca4b2c9d42c1658687c1c9757b - Sigstore transparency entry: 450824794
- Sigstore integration time:
-
Permalink:
pierrel/vgrep@994b2742d031cdd1b43276b157b0447fe5ad67a7 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/pierrel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@994b2742d031cdd1b43276b157b0447fe5ad67a7 -
Trigger Event:
release
-
Statement type: