aboutsummaryrefslogtreecommitdiffstats
path: root/run-scraper
blob: bed4eab62998acd5d9e0f57b4de2ce29eecbdb35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#
# Run scraperwiki scrapers with a fake scraperwiki library, to allow
# the scrapers to be tested locally.

file=$1

topdir=$(cd $(dirname $0); pwd)

export PYTHONPATH=`pwd`/testlib/scraperwiki-python:`pwd`/testlib/lazycache

SCRAPERWIKI_DATABASE_NAME=sqlite:///$file.sqlite
export SCRAPERWIKI_DATABASE_NAME

(cd data ; python $topdir/scrapersources/$file)