variabalize file name etc
This commit is contained in:
parent
5c233d432a
commit
34500f996b
28
build_sql.sh
28
build_sql.sh
@ -1,27 +1,9 @@
|
||||
echo "INSERT INTO scrape.raw (code,url, html) SELECT 'g_basket' code, 'https://hc-companies.com/planter_category/hanging-baskets-greenhouse/' url, \$\$" | cat - g_basket.html >temp
|
||||
echo "\$\$ html ON CONFLICT (code,url) DO UPDATE SET html = EXCLUDED.html" >> temp
|
||||
mv temp g_basket_mod.html
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
#greenhouse decorative
|
||||
code=g_deco
|
||||
url=https://hc-companies.com/planter_category/decorative-containers
|
||||
#wget https://hc-companies.com/planter_category/decorative-containers/ -O g_deco.html
|
||||
echo "INSERT INTO scrape.raw (code,url, html) SELECT 'g_deco' code, 'https://hc-companies.com/planter_category/decorative-containers/' url, \$\$" | cat - g_basket.html >temp
|
||||
echo "INSERT INTO scrape.raw (code,url, html) SELECT '$code' code, '$url' url, \$\$" | cat - "$code.html" >temp
|
||||
echo "\$\$ html ON CONFLICT (code,url) DO UPDATE SET html = EXCLUDED.html" >> temp
|
||||
mv temp g_deco.html
|
||||
|
||||
#greenhouse baskets
|
||||
wget https://hc-companies.com/planter_category/hanging-baskets-greenhouse/ -O g_basket.html
|
||||
#greenhouse round
|
||||
wget https://hc-companies.com/planter_category/round-containers/ -O g_round.html
|
||||
#greenhouse square
|
||||
wget https://hc-companies.com/planter_category/square-containers/ -O g_square.html
|
||||
#greenhouse support
|
||||
wget https://hc-companies.com/planter_category/support-systems-greenhouse/ -O g_support.html
|
||||
#greenhouse trays flats
|
||||
wget https://hc-companies.com/planter_category/trays-flats-sheets-greenhouse/ -O g_trays.html
|
||||
#nursery round
|
||||
wget https://hc-companies.com/planter_category/round-containers-nursery/ -O n_round.html
|
||||
#nursery flats and sheets
|
||||
wget https://hc-companies.com/planter_category/trays-flats-sheets-nursery/ -O n_flats.html
|
||||
#consumer bohemian
|
||||
wget https://hc-companies.com/planter_category/bohemian/ -O c_bohemian.html
|
||||
mv temp "$code.sql"
|
Loading…
Reference in New Issue
Block a user