Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download all files from a specific Sourceforge project?

After spending about an hour downloading almost every Msys package from sourceforge I'm wondering whether there is a more clever way to do this. Is it possible to use wget for this purpose?

like image 965
FFox Avatar asked Aug 02 '10 17:08

FFox


2 Answers

I've used this script successfully:

https://github.com/SpiritQuaddicted/sourceforge-file-download

For your use run:

sourceforge-file-downloader.sh msys 

It should download all the pages first then find the actual links in the pages and download the final files.

From the project description:

Allows you to download all of a sourceforge project's files. Downloads to the current directory into a directory named like the project. Pass the project's name as first argument, eg ./sourceforge-file-download.sh inkscape to download all of http://sourceforge.net/projects/inkscape/files/

Just in case the repo ever gets removed I'll post it here since it's short enough:

#!/bin/sh

project=$1
echo "Downloading $project's files"

# download all the pages on which direct download links are
# be nice, sleep a second
wget -w 1 -np -m -A download http://sourceforge.net/projects/$project/files/

# extract those links
grep -Rh direct-download sourceforge.net/ | grep -Eo '".*" ' | sed 's/"//g' > urllist

# remove temporary files, unless you want to keep them for some reason
rm -r sourceforge.net/

# download each of the extracted URLs, put into $projectname/
while read url; do wget --content-disposition -x -nH --cut-dirs=1 "${url}"; done < urllist

rm urllist
like image 50
0x78 Avatar answered Oct 05 '22 03:10

0x78


In case of no wget or shell install do it with FileZilla: sftp://[email protected] you open the connection with sftp and your password then you browse to the /home/pfs/

after that path (could be a ? mark sign) you fill in with your folder path you want to download in remote site, in my case /home/pfs/project/maxbox/Examples/

this is the access path of the frs: File Release System: /home/frs/project/PROJECTNAME/ filezilla_sourceforge

like image 22
Max Kleiner Avatar answered Oct 05 '22 02:10

Max Kleiner