一个repoze.bfg wsgi应用程序,为您的Python包提供搜索引擎
项目描述
此包允许您为您的包和包集创建自己的搜索引擎。它并不完美,但我发现它很有用。它非常快,而且通常更容易找到您要找的东西。
您可以具体搜索方法、类和文件名,或者进行全文搜索。
它基于repoze.bfg、repoze.catalog和pygments构建。
安装
首先创建一个虚拟环境
>>> virtualenv pysourcesearch --no-site-packages >>> cd pysourcesearch >>> ./bin/easy_install pysourcesearch >>> ./bin/easy_install PasteScript
然后您可以使用随包提供的ini WSGI配置,或者创建一个类似的配置
>>> [app:main] >>> use = egg:pysourcesearch#app >>> debug_notfound = false >>> catalogs_location = %(here)s/catalogs >>> reindex = False >>> package_groups = >>> Plone:/Applications/Plone/buildout-cache/eggs >>> skipped_paths = >>> tests >>> >>> [server:main] >>> use = egg:Paste#http >>> host = 0.0.0.0 >>> port = 6543
然后运行
>>> ./bin/paster serve pysourcesearch.ini
第一次运行时,将花费一些时间来索引所有内容。如果您查看目录,您将能够看到索引的状态。
>>> tail -f pysourcesearch.log
配置
以下是一些WSGI配置选项
* catalogs_location = Location where the indexes are stored * reindex = If you want to reindex every time it's run * package_groups = a list of locations to egg packages. This is normally a `buildout-cache/eggs` direction or a `lib/python2.6/site-packages` directory * skipped_paths = a list of folders that you'd rather not index the contents of
0.1
初始版本
项目详情
关闭
pysourcesearch-0.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ee74a8ba8c01bd01d7a9213f7353c13505dd0e115923dbe63a6f9a630a480bd2 |
|
MD5 | bcf567c6dc52d5e3e2722f950aed2278 |
|
BLAKE2b-256 | a9aa41d35f05d873ea165940fe96ced7ed3c8820285e9d9d8eae3a99a81a7069 |