SpiritQuaddicted / sourceforge-file-download

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/
72 stars 24 forks source link

Seems to not work anymore #3

Closed bpvarsity closed 4 years ago

bpvarsity commented 4 years ago

Tried to run this recently and it just downloads blank/empty files and folders.

SpiritQuaddicted commented 4 years ago

I commit some changes, please try again. If it still fails, please try to find a small project (few files!) that can be used to reproduce it and share the name here.

bpvarsity commented 4 years ago

Thanks for the response. Seems to be the same issue

Test project for example https://sourceforge.net/projects/mingw/files/MinGW/Extension/dos2unix/dos2unix-7.4.0-1/

Instead of downloading the files it downloads them as a folder and sticks a file called download in it.

dos2unix-7.4.0-1-mingw32-lic.tar.lzma is the file but it makes a folder called dos2unix-7.4.0-1-mingw32-lic.tar.lzma and then a file inside of that folder called download

bpvarsity commented 4 years ago

Got this fixed. I messed up and deleted the $ in front of projects in the url. Sorry about that

bpvarsity commented 4 years ago

Well that fixed it for that test repo if you just do the project as "mingw" only and not the full path. If I tell it a full path I get the issue I had.

For example https://sourceforge.net/projects/$project/files/arm64/20200918/

That will download the files as folders and place a small download file in it. If you open the download file its html code

SpiritQuaddicted commented 4 years ago

Thank you for using this script but it really is meant for all files of a whole project.

To only grab a subdirectory you could try to manually edit https://github.com/SpiritQuaddicted/sourceforge-file-download/blob/a7cc38053f4073f1ddcde2449a028f675cfd2d9b/sourceforge-file-downloader.sh#L20 and run the later commands afterwards. It might work, I am not sure.

Selectively grabbing subtrees from a project is out of scope for this script. I am open to a Pull Request but will not actively work on it.