| 1 |
from pyndexter import * |
|---|
| 2 |
from pyndexter.util import TimingFilter, quote |
|---|
| 3 |
|
|---|
| 4 |
# path to the directory your pyndexter db is stored in. This script will create the database |
|---|
| 5 |
# file if it doesn't exit, but will not create the directories. |
|---|
| 6 |
indexerdir = "/var/www/trac/indexer/" |
|---|
| 7 |
indexer = 'builtin://' + indexerdir + 'irclogs.idx?cache=true' |
|---|
| 8 |
print 'Configuration: in trac.ini, under [irclogs], put indexer=' + indexer |
|---|
| 9 |
|
|---|
| 10 |
# path to the directory your logs are stored in |
|---|
| 11 |
logdir = "/var/www/supybothome/logs/ChannelLogger/" |
|---|
| 12 |
|
|---|
| 13 |
framework = Framework(indexer, stemmer='porter://') |
|---|
| 14 |
framework.add_source('file://%s?include=*.log' % quote(logdir)) |
|---|
| 15 |
|
|---|
| 16 |
framework.update(filter=TimingFilter(progressive=True)) |
|---|
| 17 |
|
|---|
| 18 |
framework.close() |
|---|