{"id":16597360,"url":"https://github.com/cbess/text-sherlock","last_synced_at":"2025-10-11T21:06:38.305Z","repository":{"id":47426378,"uuid":"2486867","full_name":"cbess/text-sherlock","owner":"cbess","description":"Text (source code) search engine with indexer and a front end web interface to search. Uses Python 3.","archived":false,"fork":false,"pushed_at":"2023-07-20T13:10:52.000Z","size":4124,"stargazers_count":125,"open_issues_count":4,"forks_count":31,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-15T07:39:17.687Z","etag":null,"topics":["flask-application","indexer","opengrok","peewee","python","search-engine","whoosh","xapian"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbess.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-09-30T03:43:46.000Z","updated_at":"2025-04-26T02:36:42.000Z","dependencies_parsed_at":"2025-07-15T04:39:05.177Z","dependency_job_id":"a200cb8b-9180-4510-a476-82ddf453e318","html_url":"https://github.com/cbess/text-sherlock","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cbess/text-sherlock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Ftext-sherlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Ftext-sherlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Ftext-sherlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Ftext-sherlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbess","download_url":"https://codeload.github.com/cbess/text-sherlock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2Ftext-sherlock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008716,"owners_count":26084494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask-application","indexer","opengrok","peewee","python","search-engine","whoosh","xapian"],"created_at":"2024-10-11T23:55:36.705Z","updated_at":"2025-10-11T21:06:38.277Z","avatar_url":"https://github.com/cbess.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Text Sherlock (or Sherlock)\n\nProvides a fast, easy to install and simple to use search engine for text, but optimized for source code. An alternative, [OpenGrok](https://github.com/OpenGrok/OpenGrok), requires too much time to install (though it may be worth it for some), but is more feature rich. Text Sherlock will give you a much easier setup, a text indexer, and a web app interface for searching with _very little_ effort.\n\n[Soli Deo Gloria](https://perfectGod.com)\n\n## Basic Setup\n\nInstructions:\n\n1. Download [Sherlock](https://github.com/cbess/text-sherlock) source from [GitHub](https://github.com/cbess/text-sherlock).\n1. Extract/place the Sherlock source code in the desired (install) directory. This will be where Sherlock lives.\n1. Run `sh setup/virtualenv-setup.sh` to setup an isolated environment and download core packages.\n1. Configure settings. The defaults in [`settings.py`](settings.py) provide documentation for each setting.\n\t- Copy [`example.local_settings.yml`](example.local_settings.yml) to `local_settings.yml`.\n\t- Override/copy any setting from [`settings.py`](settings.py) to `local_settings.yml` (change the values as needed). All YAML keys/options **must** be lowercase.\n1. Run `source sherlock_env/bin/activate` to enter the virtual environment.\n1. Run `python main.py --index update` or `--index rebuild` to index the path specified in the settings. Watch indexing output.\n1. Run `python main.py --runserver` to start the web server.\n1. Go to `http://localhost:7777` to access the web interface. Uses the [Bootstrap](https://getbootstrap.com/) toolkit for it's UI.\n\nYou may need to install some packages before a *Ubuntu* installation will run without error.\n\n- Install curl: `sudo apt-get install curl`\n- Install uuid libs: `sudo apt-get install uuid-dev`\n- Install python dev: `sudo apt-get install python-dev`\n\n---\n\nIncludes:\n\n- Settings/Configuration\n\t- See [`settings.py`](settings.py) for details.\n- Setup script (read contents of script for more information)\n\t- Run [`virtualenv-setup.sh`](setup/virtualenv-setup.sh) to perform an isolated installation.\n- Main controller script\n\t- Run `main.py -h` for more information.\n- End-to-end interface\n\t- Indexing and searching text (source code). Built-in support for [whoosh](https://whoosh.readthedocs.io/en/stable/index.html) (fast searching) or [xapian](https://xapian.org/) (much faster searching).\n\t    - Easily extend indexing or searching via custom backends.\n\t- Front end web app served using [werkzeug](https://palletsprojects.com/p/werkzeug/) or [cheroot](https://cheroot.cherrypy.org).\n\t    - `werkzeug` is for development to small traffic.\n\t    - `cheroot` is the high-performance, pure-Python HTTP server used by [CherryPy](https://www.cherrypy.org).\n\t- Settings and configuration using [Python](https://python.org).\n\n### Web Interface\n\nFeatures:\n\nAppend to document URL.\n\n- To highlight lines, append to URL: `\u0026hl=3,7,12-14,21`\n- To jump to a line, append to end of URL: `#line-3`\n\n![screenshot](setup/web-example1.png)\n\n![screenshot](setup/web-example2.png)\n\n## Using other backends\n\nIn [`settings.py`](settings.py):\n\n- Change the `default_indexer` and `default_searcher` values to match the name given to the backend.\n    - Possible values:\n        - `whoosh` the default, no extra work needed.\n        - `xapian` must be installed separately using the included [`setup/install-xapian.sh`](setup/install-xapian.sh) setup script.\n\n## Using other web servers\n\nText Sherlock has built-in support for [werkzeug](https://palletsprojects.com/p/werkzeug/) and [cheroot](https://cheroot.cherrypy.org) WSGI compliant servers.\n\nIn [`settings.py`](settings.py):\n\n- Change the `server_type` value to one of the available server types.\n    - Possible values:\n        - `default`, werkzeug web server (default).\n        - `cheroot`, production ready web server.\n\n## Core packages\n\n**Requires Python 3.5+**\n\n* [Whoosh](https://whoosh.readthedocs.io/en/stable/quickstart.html)\n* [Flask](https://palletsprojects.com/p/flask/)\n* [Jinja2](https://jinja.palletsprojects.com/en/2.11.x/)\n* [Pygments](https://pygments.org/docs/quickstart/)\n* [peewee](https://github.com/coleifer/peewee)\n* [Bootstrap v4.x](https://getbootstrap.com/docs/4.4/getting-started/introduction/)\n* [PyYAML](https://pyyaml.org)\n\n## Other References\n\n* https://pygments.org/\n* http://docs.peewee-orm.com/\n* https://cheroot.cherrypy.org/\n* https://xapian.org/\n* https://pyyaml.org/wiki/PyYAMLDocumentation\n* https://zeptojs.com\n\n## Project Goals\n\n1. Provide an easy to setup, fast, and adequate text search engine solution.\n1. Be a respectable alternative to [OpenGrok](https://github.com/OpenGrok/OpenGrok).\n1. Influence the [OpenGrok](https://github.com/OpenGrok/OpenGrok) contributors to provide a simpler setup process.\n\t- I successfully setup two installations of OpenGrok on CentOS and Ubuntu 11.x. Each time it took more than **two hours**. Text Sherlock setup takes less than 5 minutes (excluding package download time).\n\n## Contributors\n\n- [Christopher Bess](https://github.com/cbess)\n- [Raphael Boidol](https://github.com/boidolr)\n- [And others](https://github.com/cbess/text-sherlock/contributors)...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbess%2Ftext-sherlock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbess%2Ftext-sherlock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbess%2Ftext-sherlock/lists"}