Ultra-fast file search and metadata extraction tool
Using Poetry (recommended):
# Install Poetry if you don't have it
curl -sSL https://install.python-poetry.org | python3 -
# Clone the repository and install dependencies
poetry installOr using pip:
pip install -r requirements.txt# Search with default scope (1 level up) and depth (2 levels)
poetry run qry "your search query"
# Custom scope and depth
poetry run qry "your search query" --scope 2 --max-depth 3# Basic search
python qry.py "your search query"
# With custom scope and depth
python qry.py "your search query" --scope 1 --max-depth 2Usage: qry [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
search Search for files
version Show version information
help Show help
Search Options:
-t, --type TEXT Filter by file type (comma-separated)
-d, --last-days INT Filter by last N days
-l, --limit INT Maximum number of results (default: 100)
--no-preview Disable preview generation
-v, --verbose Enable verbose output
GET /api/search- Search for files- Parameters:
q: Search query (required)types: Comma-separated list of file typeslimit: Maximum number of results (default: 100)last_days: Filter by last N daysengine: Search engine to use (default: 'default')
- Parameters:
qry/cli/- Command-line interfaceqry/api/- REST API implementationqry/core/- Core models and interfacesqry/engines/- Search engine implementationsqry/utils/- Utility functionsqry/web/- Web interface components
- Create a new file in
qry/engines/ - Implement the
SearchEngineinterface fromqry.engines.base - Register your engine in
qry/engines/__init__.py
# Install test dependencies
pip install -e ".[test]"
# Run tests
pytestContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
-
Thanks to all contributors who have helped improve this project.
-
Special thanks to the developers of the amazing open-source libraries that make this project possible.
2: Two levels up, etc.
-
--max-depth: Maximum directory depth to search (default: 2)1: Current directory only2: Current directory + one level down (default)3: Two levels down, etc.
Najszybsze języki/narzędzia:
- Rust + ripgrep - najszybszy dla prostych wzorców regex
- C++ + PCRE2 - maksymalna wydajność dla złożonych wzorców
- Python + ujson + lxml - najlepszy stosunek szybkość/łatwość
- Go + fastjson - bardzo szybki, łatwy deployment
- Node.js + cheerio - dobry dla projektów JS
Najszybsze biblioteki:
- Obrazy:
exiv2(C++),PIL/Pillow(Python),sharp(Node.js) - PDF:
PyMuPDF/fitz(Python),PDFtk(Java),pdfinfo(Poppler) - Email:
email(Python),JavaMail(Java),mail(Go) - Audio:
eyed3(Python),TagLib(C++),ffprobe(FFmpeg) - Video:
OpenCV(Python/C++),ffprobe(FFmpeg),MediaInfo
- FFmpeg - niepobiły w audio/video (C, Python bindings)
- ImageMagick/GraphicsMagick - obrazy (CLI + bindings)
- Pandoc - dokumenty tekstowe (Haskell, CLI)
- LibreOffice CLI - dokumenty biurowe
- wkhtmltopdf - HTML→PDF (WebKit engine)
- Template engines: Jinja2 (Python), Mustache (multi-lang), Handlebars (JS)
- Direct generation: f-strings (Python), StringBuilder (Java/C#)
- Component-based: React SSR, Vue SSR dla złożonych UI
- Streaming: Writer patterns dla bardzo dużych plików
┌───────────────────────────────────────────────────────────┐
│ QRY Features │
├───────────────────────────────┬─────────────────────────┤
│ 🔍 Smart Search │ Fast pattern matching │
│ 📊 Metadata Extraction │ EXIF, PDF, documents │
| ⚡ Parallel Processing | Multi-core performance │
| 🎨 Format Conversion | Convert between formats │
| 📱 Responsive Output | HTML, JSON, text │
| 🛡️ Smart Caching | Faster repeated queries │
└───────────────────────────────┴─────────────────────────┘
# Find all Python files containing 'class'
qry "class" --type py
# Search with regex
qry "import\s+\w+" --regexgraph LR
A[Query] --> B{Type?}
B -->|Search| C[File Search]
B -->|Metadata| D[Metadata Extraction]
B -->|Convert| E[Format Conversion]
C --> F[Filter Results]
D --> F
E --> F
F --> G[Format Output]
G --> H[Display Results]
style A fill:#f9f,stroke:#333
style H fill:#9f9,stroke:#333
For more examples and detailed documentation, see EXAMPLES.md.
# Search for invoices
qry "invoice OR faktura"
# Search for images with EXIF data
qry "image with exif" --max-depth 3
# Search in parent directory
qry "important document" --scope 2
# Deep search in current directory only
qry "config" --scope 0 --max-depth 5# Find PDFs modified in the last 7 days
qry "filetype:pdf mtime:>7d"
# Search for large files
qry "size:>10MB"
# Find files with specific metadata
qry "author:john created:2024"System automatycznie:
- Wykrywa typ zapytania
- Wybiera odpowiednie parsery
- Generuje zoptymalizowany HTML
- Tworzy interaktywne GUI