pdf_indir 272 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. # milisarge-milislinux
  3. if [ ! -f /usr/bin/wkhtmltopdf ];then
  4. echo "wkhtmltopdf kurunuz!"
  5. exit 1
  6. fi
  7. url=""
  8. if [ -z $1 ];then
  9. echo "link eksik!"
  10. exit 1
  11. else
  12. url="$1"
  13. fi
  14. wkhtmltopdf ${url} "$(curl -s ${url}| grep -o "<title>[^<]*" | tail -c+8).pdf"