Created
January 20, 2024 14:22
-
-
Save naranyala/7406b0fb192984e46f032fa4ea1b0d23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Rofi prompt for website URL | |
website_url=$(rofi -dmenu -p "Enter the website URL:") | |
# Extract the website name | |
website_name=$(echo "$website_url" | awk -F[/:] '{print $4}') | |
# Rofi prompt for folder name | |
folder_name=$(rofi -dmenu -p "Enter folder name for $website_name:") | |
# Create a new Kitty terminal and execute HTTrack, showing output | |
kitty --hold bash -c "mkdir -p \"$HOME/Downloads/$folder_name\" && cd \"$HOME/Downloads/$folder_name\" && httrack \"$website_url\" -r2 > \"$HOME/Downloads/$folder_name.log\" 2>&1 && notify-send 'Website Download Completed' 'The download of $website_url is complete. Check the folder $HOME/Downloads/$folder_name.'" & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment