You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Quick grab Scott's albums

Author (Read 3765 times)

0 Members and 1 Guest are viewing this topic.

Re: Quick grab Scott's albums
« Reply #4 on: February 05, 2015, 01:34:13 AM »
 

anon222

  • Muted
  • Gold Level Poster
  • *
  • 688
    Posts
  • Reputation: 192
  • Linux Lite Member
    • View Profile

  • CPU: Dual core Pentium E5700 3GHz

  • MEMORY: 3Gb

  • VIDEO CARD: GeForce GT 430
Thanks. There are some nice wallpapers in ubuntu's repo.
Code: [Select]
apt-cache search '^.*-wallpapers|^.*-backgrounds'
 

Re: Quick grab Scott's albums
« Reply #3 on: February 01, 2015, 12:45:02 AM »
 

Scott

  • Global Moderator
  • Gold Level Poster
  • *****
  • 857
    Posts
  • Reputation: 186
  • Linux Lite Member
    • View Profile

  • CPU: Dual core Intel Core i3 M 330

  • MEMORY: 6Gb

  • VIDEO CARD: Intel Integrated Graphics
Very nice, Misko, thanks!
 

Re: Quick grab Scott's albums
« Reply #2 on: January 31, 2015, 09:27:01 PM »
 

altman

  • Gold Level Poster
  • *******
  • 739
    Posts
  • Reputation: 43
  • Linux Lite Member
    • View Profile
Wow , you always get some new way of doing these bashes ! Props to you Misko .
HP DV7 i7 2670QM 500.1GB 8GB Ram Dual-Boot LL2.4 Beta / Extix 15.1.1 64-bit 
Dell Inspiron 1720 CrunchBang 11

Duckduckgo ( for now )
 

Quick grab Scott's albums
« Reply #1 on: January 31, 2015, 07:27:23 PM »
 

anon222

  • Muted
  • Gold Level Poster
  • *
  • 688
    Posts
  • Reputation: 192
  • Linux Lite Member
    • View Profile

  • CPU: Dual core Pentium E5700 3GHz

  • MEMORY: 3Gb

  • VIDEO CARD: GeForce GT 430
This will download Scott(0)'s albums from imgur.com
If you want to see the images click here.

Instructions.
Save the script anywhere, make executable, run (double click or via Terminal ./scott.sh).

Code: [Select]
#! /bin/bash

save_path(){
SAVE=$(zenity --file-selection --directory --title="Where do you want to save the images?")
    if [ "${PIPESTATUS[0]}" -ne "0" ]; then
        exit 0
    fi
#Create and then enter directory
cd "$SAVE"
mkdir "$NAME"
cd "$NAME"
}

get_list(){

LIST=$(mktemp /tmp/image_list.XXXXXX)

    for i in $(curl $URL | grep '{"hash":"' | sed 's/,/ /g;s/}[ ]{/\n/g;s/}].*$//g;s/.*\[{//g;s/"hash":"/i\.imgur.com\//g' | sed 's/"[ ]".*ext":"//g;s/".*$//g')
        do
            echo $i>> $LIST
        done
}

download(){
i=1
TOTAL_LINES=$(wc -l <$LIST)

for line in `cat $LIST`
    do
        wget -q $line 2>/dev/null       
        (( PERCENTAGE = 100 \* ${i} / ${TOTAL_LINES} ))
        echo "$PERCENTAGE"
        echo "#$PERCENTAGE% Downloaded"
        let ++i
        if [[ "$i" -gt  "$TOTAL_LINES" ]]; then
            break
        fi
    done | zenity --progress --auto-close --title="Downloading..."
   
unset URL
unset i
}

main_window(){
URL=$(zenity --list --radiolist --ok-label="Select" --cancel-label="Exit" --title="Quick Grab Scott's images" \
--text="Select Scott's albums you whish to download.\nThen, select the location you whish to save the images.\nAlbum's directory will we automatically ceated.\nhttp://scott53.imgur.com/" --height=490 --width=390 --hide-column=4 --print-column=4 \
--column="Pick" --column="Name" --column="Total images" --column="url" \
"TRUE" "Chalet OS 14.04" "50" "http://imgur.com/a/sp8Lu" \
"FALSE" "Elementary OS - Luna" "21" "http://imgur.com/a/8BZYD" \
"FALSE" "Linux Lite 2.2" "17" "http://imgur.com/a/mPNBt" \
"FALSE" "Linux Lite 2.0" "13" "http://imgur.com/a/bKmTP" \
"FALSE" "Linux Lite 1.0.8" "11" "http://imgur.com/a/U60p3" \
"FALSE" "Linux Lite 1.0.6" "19" "http://imgur.com/a/ZTnG4" \
"FALSE" "Linux Mint 17 Qiana XFCE" "24" "http://imgur.com/a/39E1J" \
"FALSE" "LXLE 14.04" "100" "http://imgur.com/a/EyYpO" \
"FALSE" "LXLE 12.04.4" "98" "http://imgur.com/a/hPT7V" \
"FALSE" "Makulu Cinnamon Debian Edition 1.0" "45" "http://imgur.com/a/86cL2" \
"FALSE" "Makulu 5.0 - XFCE" "79" "http://imgur.com/a/SuPAb" \
"FALSE" "Ubuntu Mate 14.10" "37" "http://imgur.com/a/ZXfzb" \
"FALSE" "Voyager 14.04.2" "176" "http://imgur.com/a/E6EiL" \
"FALSE" "Zorin 9 - Core" "18" "http://imgur.com/a/MD0If" \
)
    if [ "${PIPESTATUS[0]}" -ne "0" ]; then
        exit 0
    fi

case $URL in
"http://imgur.com/a/sp8Lu")
NAME="Chalet OS 14.04"
;;
"http://imgur.com/a/8BZYD")
NAME="Elementary OS - Luna"
;;
"http://imgur.com/a/mPNBt")
NAME="Linux Lite 2.2"
;;
"http://imgur.com/a/bKmTP")
NAME="Linux Lite 2.0"
;;
"http://imgur.com/a/U60p3")
NAME="Linux Lite 1.0.8"
;;
"http://imgur.com/a/ZTnG4")
NAME="Linux Lite 1.0.6"
;;
"http://imgur.com/a/39E1J")
NAME="Linux Mint 17 Qiana XFCE"
;;
"http://imgur.com/a/EyYpO")
NAME="LXLE 14.04"
;;
"http://imgur.com/a/hPT7V")
NAME="LXLE 12.04.4"
;;
"http://imgur.com/a/86cL2")
NAME="Makulu Cinnamon Debian Edition 1.0"
;;
"http://imgur.com/a/SuPAb")
NAME="Makulu 5.0 - XFCE"
;;
"http://imgur.com/a/ZXfzb")
NAME="Ubuntu Mate 14.10"
;;
"http://imgur.com/a/E6EiL")
NAME="Voyager 14.04.2"
;;
"http://imgur.com/a/MD0If")
NAME="Zorin 9 - Core"
;;
esac
}

main_window
save_path
get_list
unset URL
download
rm $LIST
thunar "$SAVE" &
exit 0
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section