SciLor's Open Source Forums

Also visit my Website!
It is currently Thu Jul 27, 2017 6:51 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Jul 30, 2011 3:20 pm 
hi all,

i coded a little download script which might help you batch-downloading several files at once. copy it into the directory where the jar-file resides and just run it by typing ./dl.sh (dont forget to chmod u+x) and then enter your search string.
as a result you get the song list. you can then for example type 1-6,9-13 to download the files 1 to 6 and 9 to 13. single numbers seperated by commas are also possible. hope it helps :)

Code:
#!/bin/sh
echo Search:
read string
java -jar SciLorsJGroovesharkDownloader.jar /c /l "$string"
echo "Download index (e.g. 1-5 or 2,3,5):"
read number

   IFS=","
   i=0
   array=($number)
   len=${#array[*]}
   echo $len
   unset IFS
   echo ${array[0]}
   echo ${array[1]}
   while [ $i -lt $len ]
   do   
      if `echo ${array[$i]} | grep "-" 1>/dev/null 2>&1`
      then
         IFS="-"
         interval=(${array[$i]})
         echo start
         start=${interval[0]}
         echo $start
         
         echo stop
         end=${interval[1]}
         echo $end
         while [ $start -le $end ]
         do
            echo $start
            java -jar SciLorsJGroovesharkDownloader.jar /c /d "$string" "$start"
                      start=`expr $start + 1`
         done
         unset IFS
   
      else
         java -jar SciLorsJGroovesharkDownloader.jar /c /d "$string" "${array[$i]}"
      fi
   i=$[$i+1]
   done


have fun, tobi


Last edited by urmeli on Sat Jul 30, 2011 3:40 pm, edited 1 time in total.

Top
  
 
 
Online
The Adswinger

Joined: Wed Jan 13, 2010 11:56 pm
Posts: Too many!
Donated: Ad Posts


 Post subject: Re: bash download script
PostPosted: Sat Jul 30, 2011 3:26 pm 
Offline
The Developer

Joined: Wed Jan 13, 2010 11:56 pm
Posts: 1467
Donated: free software
Thank you for posting your script here, it will be useful for all users :).

Could you translate the echos into english? Then I will make it sticky in the forum.

_________________
My Windows Mobile and Windows Open Source Website:
www.scilor.com

Like my work? Donate!
Donation Website

My Programs:
grooveshark™.com Downloader, GrooveMobile, Fuel Blaster, Chameleon TicTacToe, QuickTap, WiMoBlue, Driving Licence Trainer, CodeSnippetViewer, Gesture Launcher, Fahrplanauskunft, GSensor Control


Top
 Profile  
 
 Post subject: Re: bash download script
PostPosted: Sat Jul 30, 2011 3:40 pm 
done.


Top
  
 
PostPosted: Sun Oct 30, 2011 2:49 pm 
thx.

SciLorsJGrooveSharkDownloader.jar and
SciLorsJGroovesharkDownloader.jar are different files. Please fix this in the right name.


Top
  
 
PostPosted: Sat Aug 09, 2014 8:02 pm 
I'm running linux mint 17.
I can download a single song , but fails if I try to input an interval

Code:
26. De-Phazz - Rock & Roll Dude - Days of Twang
27. De-Phazz - Devil's Music (Reprise) - Days of Twang
Download index (e.g. 1-5 or 2,3,5):
1-5
./gdown: 10: ./gdown: Syntax error: "(" unexpected


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
template->_php_include(): File ./counter/foruminclude.php does not exist or is empty Powered by phpBB® Forum Software © phpBB Group