跳转到主要内容

一个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

  • 初始版本

项目详情


版本历史 发布通知 | RSS 源

下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分布

pysourcesearch-0.1.tar.gz (26.4 kB 查看哈希值)

上传时间 源代码

支持者