blob: e264cd097f4a3e09e91d4bb193dd894b94f4dbb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/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
# Tell python to use UTF-8 on stdout
PYTHONIOENCODING=UTF-8
export PYTHONIOENCODING
(cd data ; python $topdir/scrapersources/$file)
|