Advertisement
v1ral_ITS

web2pdf shell script

Oct 2nd, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3.  
  4. if [ -f /usr/bin/wkhtmltopdf ];
  5.              then
  6.  
  7. website=$(zenity --title  "Enter your website address: "  --entry --text="Ex: http://google.com " --width 300)
  8. name=$(zenity --title  "Enter pdf name: "  --entry --text="Ex: google \nUse no spaces" --width 300 )
  9. cd $HOME/Desktop
  10. wkhtmltopdf $website $name.pdf | zenity --title="Saving..." --progress --pulsate --auto-close --no-cancel --text="Saving your page to Desktop and coverting to pdf...\n $website" --width 350
  11.  
  12. else
  13. echo | zenity --progress --title="The program not installed" --text=" Install using commandline:\n \n sudo apt-get install wkhtmltopdf" --width 300
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement