Dogsheep search index
Project description
dogsheep-beta
Dogsheep search index
Installation
Install this tool like so:
$ pip install dogsheep-beta
Usage
Run the indexer using the dogsheep-beta
command-line tool:
$ dogsheep-beta index dogsheep.db config.yml
The config.yml
file contains details of the databases and tables that should be indexed:
twitter.db:
tweets:
sql: |-
select
tweets.id as key,
'Tweet by @' || users.screen_name as title,
tweets.created_at as timestamp,
tweets.full_text as search_1
from tweets join users on tweets.user = users.id
users:
sql: |-
select
id as key,
name || ' @' || screen_name as title,
created_at as timestamp,
description as search_1
from users
This will create a search_index
table in the dogsheep.db
database populated by data from those SQL queries.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd dogsheep-beta
python3 -mvenv venv
source venv/bin/activate
Or if you are using pipenv
:
pipenv shell
Now install the dependencies and tests:
pip install -e '.[test]'
To run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dogsheep-beta-0.1a0.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for dogsheep_beta-0.1a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfb6414efe051d4cd5bc7dafb8406a2e551c82eb583ed6d0cbdaf4b4877d3b06 |
|
MD5 | f5aacd95053ab80d92efb9a36ced0dbc |
|
BLAKE2b-256 | bc1dfbba656a5e5eb338c23892c0aa209e4ebef0477c2b3651108ccb6f4442fe |