insert_one_record=0
PATH_URPA=/var/www/www-root/data/www/vestnik-urpa.ru/urpa
OLD_PATH=`pwd`
cd $PATH_URPA
rm test*.json
scrapy crawl kubzsk -o test3.json
#scrapy crawl zsro -o test12.json
scrapy crawl huralrk -o test1.json
scrapy crawl astroblduma -o test5.json
#scrapy crawl gshra -o test10.json
scrapy crawl volgoduma -o test9.json
scrapy crawl crimea -o test8.json
#scrapy crawl sevzakon -o test7.json
#scrapy crawl parlament09 -o test11.json
#scrapy crawl parlamentri -o test4.json
#scrapy crawl osetia -o test6.json
#scrapy crawl parlamentra -o test2.json

cp images/full/* ../assets/foto

php -f exporter.php test3.json $insert_one_record
#php -f exporter.php test12.json $insert_one_record
php -f exporter.php test1.json $insert_one_record
php -f exporter.php test5.json $insert_one_record
#php -f exporter.php test10.json $insert_one_record
php -f exporter.php test9.json $insert_one_record
php -f exporter.php test8.json $insert_one_record
#php -f exporter.php test7.json $insert_one_record
#php -f exporter.php test11.json $insert_one_record
#php -f exporter.php test4.json $insert_one_record
#php -f exporter.php test6.json $insert_one_record
#php -f exporter.php test2.json $insert_one_record

rm -rf discard_*
ls | grep prev_data\.json| sed "p;s/^/discard_/"| xargs -n 2 mv
cd $OLD_PATH
