not really known
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

27 líneas
850 B

  1. #!/usr/bin/env sh
  2. # Download PDF files for a planning application from Sutton Council planning website
  3. # If you run this more than once it'll only download the new files uploaded for that application.
  4. # Usage: $ get.sh <application number>, e.g. $ get.sh B2015/71962
  5. # Install curl and wget before use. Mac users can install them with Homebrew.
  6. # Windows users: Try running this in Cygwin or install Linux in a virtual machine.
  7. # Adrian Short 26 Feb 2016
  8. COOKIEJAR=cookiejar.txt
  9. mkdir -p $1
  10. cd $1
  11. curl -s -c $COOKIEJAR 'http://gis.sutton.gov.uk/FASTWEB/welcome.asp' > /dev/null # Get the session cookies
  12. curl -s -c $COOKIEJAR \
  13. --data "cbxCopyrightStatement=on" \
  14. --data "ApplicationNumber=$1" \
  15. 'http://gis.sutton.gov.uk/FASTWEB/images.asp' \
  16. | grep -E -o 'http.+?\.(pdf|PDF)' \
  17. | wget --no-clobber -i -
  18. rm $COOKIEJAR
  19. ls -lht
  20. cd -