forked from axiom-team/astrXbian
missing loop increment on error
This commit is contained in:
parent
9188290831
commit
81fb9e78cf
|
@ -123,7 +123,7 @@ echo "SUB-SCRAPING lieu FROM $geodata"
|
|||
[ -d ~/.zen/ipfs/.$IPFSNODEID/astroport/map/p4n/lieu/$lid ] && lieu=$(cat $geodata | jq -r '.lieux[] | "\(.id),\(.latitude),\(.longitude),\(.hauteur_limite),\(.publique),\(.top_liste),\(.code),\(.validation_admin),\(.distance)"' | shuf | tail -n 1)
|
||||
lid=$(echo "$lieu" | cut -d ',' -f 1); code=$(echo "$lieu" | cut -d ',' -f 7)
|
||||
|
||||
[[ "$lid" == "" ]] && echo "ERROR LIEU NO ID. CONTINUE" && continue
|
||||
[[ "$lid" == "" ]] && echo "ERROR LIEU NO ID. CONTINUE" && loop=$(($loop+1)) && continue
|
||||
|
||||
|
||||
mkdir -p /tmp/$lid && cd /tmp/$lid
|
||||
|
@ -136,7 +136,7 @@ echo "SUB-SCRAPING lieu FROM $geodata"
|
|||
# Get 1st copy bulle.pdf... Now converting to index.html redirect to $lid.jpg
|
||||
[ -f ~/.zen/ipfs/.$IPFSNODEID/astroport/map/p4n/lieu/$lid/bulle.pdf ] && mv ~/.zen/ipfs/.$IPFSNODEID/astroport/map/p4n/lieu/$lid/bulle.pdf ./output.pdf && echo "ancien fichier bulle.pdf"
|
||||
[ ! -f ~/.zen/ipfs/.$IPFSNODEID/astroport/map/p4n/lieu/$lid/index.html ] && echo "running chromium... " && chromium --timeout=10000 --headless --no-sandbox --disable-gpu --print-to-pdf=output.pdf "https://www.park4night.com/?page=lieu&id=$lid&bulle=YES" 2>/dev/null
|
||||
[ ! -f ./output.pdf ] && rm -Rf ~/.zen/ipfs/.$IPFSNODEID/astroport/map/p4n/lieu/$lid && echo "## CHROMIUM TIMEOUT, CANCEL MISSION" && continue
|
||||
[ ! -f ./output.pdf ] && rm -Rf ~/.zen/ipfs/.$IPFSNODEID/astroport/map/p4n/lieu/$lid && echo "## CHROMIUM TIMEOUT, CANCEL MISSION" && loop=$(($loop+1)) && continue
|
||||
|
||||
## PDF convert and crop to JPG / ipfs add / index.html for redirect
|
||||
if [ -f ./output.pdf ]; then
|
||||
|
|
Loading…
Reference in New Issue