On Thu, Jun 10, 2010 at 8:48 PM, ♪♫▬aze <[email protected]> wrote:

> #!/bin/bash
> n=$1;
> string=$2;
> start=$3;
> end=$4;
> link=$5;
> attrib=$6;
> mkdir "$n.$string"
> for i in $(seq -f %02.f $start $end);
> do
> wget -c "$link$i.jpg" -O "$n.$string/AK.$n""x$i.jpg";
> done;
> ls -l "$n.$string";
>
> if [[ $attrib == "" ]]; then
> zip -r "$n.$string.cbz" "$n.$string"
> rm -r "$n.$string"
> fi
>
>
You should have explained those six arguments with the code.

♪♫▬aze,
Here a simpler one with just a single argument. Everything else are auto
identified.

#!/bin/bash
# usuage: ./managa.sh <URL>
# eg: ./managa.sh http://www.onemanga.com/Naruto/498/

# Need a argument. The url.
[ -z "$1" ] && exit 0

DIR=`echo $1 | cut -d'/' -f4`
LINK=`wget -q "$101" -O- | sed -n
's/.*manga-page.*src="\(.*\)01\.jpg".*/\1/gp'`
mkdir -p "${DIR}"
for i in `seq -w 1 99`
do
wget -q "${LINK}${i}.jpg" -O "${DIR}/${i}.jpg"
if [ $?  -ne 0 ] ; then
    rm -f "${DIR}/${i}.jpg"
    echo "Done"
    exit 0
fi
done



>  --
> FOSS Nepal mailing list: [email protected]
> http://groups.google.com/group/foss-nepal
> To unsubscribe, e-mail: 
> [email protected]<foss-nepal%[email protected]>
>
> Mailing List Guidelines:
> http://wiki.fossnepal.org/index.php?title=Mailing_List_Guidelines
> Community website: http://www.fossnepal.org/




-- 
Regards,
Suraj Sapkota, aka SATA
सुरज सापकोटा
~ As long as I have a want, I have a reason for living. Satisfaction is
death. ~

-- 
FOSS Nepal mailing list: [email protected]
http://groups.google.com/group/foss-nepal
To unsubscribe, e-mail: [email protected]

Mailing List Guidelines: 
http://wiki.fossnepal.org/index.php?title=Mailing_List_Guidelines
Community website: http://www.fossnepal.org/

Reply via email to