#!/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)