Sign up here and you can log into the forum!

ZigzagDownLoader (ZDL)

This is the place to ask for how to use software that is (or isn't) included in the various wdlxtv flavours. Questions about software such as rtorrent, NZBGet, sshfs, curlftpfs, ssh, telnet, etc.

ZigzagDownLoader (ZDL)   

Postby steom » Wed May 14, 2014 8:54 am

ZigzagDownLoader is a CLI downloader. Currently, using ZDL you can also download files from Youtube, Dailymotion, Metacafe, Topvideo, Putlocker (file HD), Nowdownload, Rapidshare, Cyberlocker, Easybytez, BillionUploads, Glumbouploads and Mediafire (just a little while ago also from uploaded.to, shareflare.net and 4us.to), from Sharpfile and Depositfiles after you have solved the captcha and you can download the streaming video file from Youtube, Nowvideo, Putlocker... and from every other streaming service in the web using an add-on for your web browser, such Flashgot for Iceweasel/Firefox or FVD Video Download + Download Assistant for Chrome/Chromium.
ZDL is a bash script and depends on Axel, which is automatically installed. Using proxies, ZDL can download files in parallel and, using Axel, it can accelerate downloads and automatically recover and complete them if interrupted.

it's possibile to adapt this bash script to run on wdlxtv-live?

Code: Select all
#!/bin/bash -i
#
# ZigzagDownLoader (ZDL)
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# Copyright (C) 2012
# Free Software Foundation, Inc.
#
# For information or to collaborate on the project:
# https://savannah.nongnu.org/projects/zdl
#
# Gianluca Zoni (project administrator and first inventor)
# http://inventati.org/zoninoz
# zoninoz@inventati.org
#



function bold {
   echo -e "\e[1m$1\e[0m"
}


#### Axel

function check_downloader {
   while [ -z "`which axel 2>/dev/null`" ]; do
      bold "ATTENZIONE: Axel non è installato nel tuo sistema"
      
      echo -e "$PROG può scaricare con Wget ma raccomanda fortemente Axel, perché:\n
   - può accelerare sensibilmente il download
   - permette il recupero dei download in caso di interruzione
   
Per ulteriori informazioni su Axel: http://alioth.debian.org/projects/axel/

1) Installa automaticamente Axel da pacchetti
2) Installa automaticamente Axel da sorgenti
3) Esci da $PROG per installare Axel manualmente (puoi trovarlo qui: http://pkgs.org/search/?keyword=axel)"

      bold "Scegli cosa fare (1-3)"
      read input
      
      case $input in
      
      1) install_pk ;;
      2) install_src ;;
      3) exit ;;
      
      esac
   done
}

function install_test {
   if [ -z "`which axel 2>/dev/null`" ]; then
      bold "Installazione automatica non riuscita"
      case $1 in
         pk) echo "$2 non ha trovato il pacchetto di Axel" ;;
         src) echo "Errori nella compilazione o nell'installazione";;
      esac
   fi
   echo
   bold "<Premi un tasto per continuare>"
   read
}

function install_pk {
   echo "Installo Axel ..."
   if [ `which apt-get 2>/dev/null` ]; then
      DEBIAN_FRONTEND=noninteractive sudo apt-get --no-install-recommends -q -y install axel || (  echo "Digita la password di root" ; DEBIAN_FRONTEND=noninteractive su -c "apt-get --no-install-recommends -q -y install axel" )
      install_test pk apt-get
   elif [ `which yum 2>/dev/null` ]; then
      sudo yum install axel || ( echo "Digita la password di root" ; su -c "yum install axel" )
      install_test pk yum
   elif [ `which pacman 2>/dev/null` ]; then
      sudo pacman -S axel 2>/dev/null || ( echo "Digita la password di root" ; su -c "pacman -S axel" )
      install_test pk pacman
   else
      install_test
   fi
}

function install_src {
   cd /usr/src
   wget http://alioth.debian.org/frs/download.php/3015/axel-2.4.tar.gz
   tar zxvf axel-2.4.tar.gz
   cd axel-2.4
   
   make
   sudo make install || ( echo "Digita la password di root" ; su -c "make install" )
   make clean
   install_test src
   cd -
}


function install_axel-cygwin {
   test_axel=`which axel`
   if [ -z $test_axel ]; then
      cd /
      wget "$axel_url"
      tar -xvjf "${axel_url##*'/'}"
      cd -
   fi
}


function install_zdl-wise {
    if [ ! -e "/cygdrive" ]; then
   gcc extensions/zdl-wise.c -o extensions/zdl-wise 2>/dev/null || sudo gcc extensions/zdl-wise.c -o extensions/zdl-wise 2>/dev/null || su -c "gcc extensions/zdl-wise.c -o extensions/zdl-wise" 2>/dev/null || bold "\nCompilazione del sorgente zdl-wise.c non riuscita"
    fi
}


function install_zdl-conkeror {
    if [ -f "$HOME/.conkerorrc" ]; then
   [ -f "$path_conf/conkerorrc.zdl" ] && rm "$path_conf/conkerorrc.zdl"
   text_conkerorrc=$(cat "$HOME/.conkerorrc")
   if [ "$text_conkerorrc" != "${text_conkerorrc//$path_conf\/conkerorrc.zdl}" ]; then
       cp "$HOME/.conkerorrc" "$HOME/.conkerorrc.old"
       echo "${text_conkerorrc//require(\"$path_conf\/conkerorrc.zdl\");}" > "$HOME/.conkerorrc"
   fi
   test=$(cat "$HOME/.conkerorrc"|grep "$SHARE/extensions/conkerorrc.zdl" |tail -n 1)
   test2=$(echo "${test#*'//'}" |grep "$SHARE/extensions/conkerorrc.zdl")
   if [ -z "$test" ]; then
       echo -e "\n// ZigzagDownLoader\nrequire(\"$SHARE/extensions/conkerorrc.zdl\");" >> "$HOME/.conkerorrc"
   elif [ "$test" != "$test2" ] && [ ! -z "$test2" ]; then
       bold "\nLa funzione ZDL di Conkeror è stata disattivata dall'utente nel file "$HOME"/.conkerorrc: per riattivarla, cancella i simboli di commento \"\\\\\""
   fi
    fi
}

function try {
    cmd=$*
    $cmd 2>/dev/null
    if [ "$?" != 0 ]; then
   sudo $cmd
   if [ "$?" != 0 ]; then
       su -c "$cmd" || ( print_c 3 "$failure"; exit )
   fi
    fi
}

PROG=ZigzagDownLoader
prog=zdl
BIN="/usr/local/bin"
SHARE="/usr/local/share/zdl"
URL_ROOT="http://download.savannah.gnu.org/releases/zdl/"
axel_url="http://www.inventati.org/zoninoz/html/upload/files/axel-2.4-1.tar.bz2" #http://fd0.x0.to/cygwin/release/axel/axel-2.4-1bl1.tar.bz2
success="Installazione completata"
failure="Installazione non riuscita"
path_conf="$HOME/.$prog"
origin_dir="$PWD"

echo -e "\e[1mInstallazione di ZigzagDownLoader\e[0m\n"

mkdir -p "$path_conf/src"
cd "$path_conf/src"
rm *.tar.gz* $prog -rf
wget "$URL_ROOT" -r -l 1 -A gz,sig,txt -np -nd -q
cp *.sig "$path_conf"/zdl.sig

package=$(ls *.tar.gz)
tar -xzf "$package"

mv "${package%.tar.gz}" $prog
cd $prog
install_zdl-wise

chmod +rx -R .
bold "Installazione in $BIN\n"
try mv zdl zdl-xterm $BIN
[ -e /cygdrive ] && ( mv ${prog}.bat / ) && bold "\nScript batch di avvio installato: $(cygpath -m /)\zdl.bat "
cd ..

bold "Installazione in $SHARE\n"
[ ! -e "$SHARE" ] && try mkdir -p "$SHARE"
try rm -rf "$SHARE"
try cp -r $prog "$SHARE"

install_zdl-conkeror


## Axel
if [ -e "/cygdrive" ]; then
   install_axel-cygwin
else
   check_downloader
fi

bold "$success"
bold "Per informazioni su ZigzagDownLoader (zdl): zdl --help"
read -p "$PROG è stato reinstallato: release, version 1.0 (premi <invio> per continuare)"

cd "$origin_dir"
$prog $@
exit
steom
DLX'er
 
Posts: 56
Joined: Thu Apr 15, 2010 12:00 pm

Re: ZigzagDownLoader (ZDL)   

Postby KAD » Wed May 14, 2014 4:34 pm

not real easy to adapt to WD

first axel doesn't exist on WD, which is required for ZDL to function
also gnu make commands don't exist, so after download it would not compile/install
also apt-get, yun, and like do not exist either
one would need to download the source code and cross compile it
or chroot into debian and compile it as well as any other missing dependancies

I can see the usefullness of this, particularly for UMSP streaming, but I don't have the time, and as said, not particularly easy
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ZigzagDownLoader (ZDL)   

Postby steom » Thu May 15, 2014 11:54 am

hi,
axel is not required
zdl use wget also
that part of the script can be totally skipped
steom
DLX'er
 
Posts: 56
Joined: Thu Apr 15, 2010 12:00 pm

Re: ZigzagDownLoader (ZDL)   

Postby KAD » Thu May 15, 2014 1:12 pm

axel appears to be more than half the script, but ok

as for zdl, still don't think it's easy

the script you posted is basically just an installer script
the installer script would be pointless on wdlxtv
as none of the dependancies exist, ok bash and wget exist but nothing else it needs

I'm not say it's impossible, just saying if you want it, you'll have to donwload source and compile it then manually install, and see if it works
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ZigzagDownLoader (ZDL)   

Postby steom » Thu May 15, 2014 2:44 pm

the entire zdl system
is only a compilation of bash .sh scripts
no other exe or something to compile to make it work.
steom
DLX'er
 
Posts: 56
Joined: Thu Apr 15, 2010 12:00 pm

Re: ZigzagDownLoader (ZDL)   

Postby KAD » Thu May 15, 2014 4:19 pm

I did not look to deep into this, because I don't have time to do it

if it's just bash it makes it easier, but it still might call scripts or binaries that just do not exist in wdlxtv

either way, it's possible,

my recommendation above was to compile and try it

so now you don't need to compile anyting, just copy the scripts and try it
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ZigzagDownLoader (ZDL)   

Postby steom » Fri May 16, 2014 1:50 am

the problem actually is that the paths where copy the .sh in wdlxtv is read-only
steom
DLX'er
 
Posts: 56
Joined: Thu Apr 15, 2010 12:00 pm

Re: ZigzagDownLoader (ZDL)   

Postby recliq » Fri May 16, 2014 2:26 am

steom wrote:the problem actually is that the paths where copy the .sh in wdlxtv is read-only

...it's just ONE of the problems, just like KAD said.
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: ZigzagDownLoader (ZDL)   

Postby KAD » Fri May 16, 2014 7:52 am

steom wrote:the problem actually is that the paths where copy the .sh in wdlxtv is read-only


so grab an ext3 version of the firmware
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ZigzagDownLoader (ZDL)   

Postby steom » Sat May 17, 2014 5:36 am

i'm on ext3 root.bin
from the terminal
1.05.04_V_WDLXTV.COM_EXT3-BOOT_LIVE-0.5.1.1
but the filesystem is still read-only. :?:
steom
DLX'er
 
Posts: 56
Joined: Thu Apr 15, 2010 12:00 pm

Next

Return to Application Questions

Who is online

Users browsing this forum: No registered users and 1 guest