pinkie pie

mendel


Rich Lafferty's Journal

(mendelicious mendelusions)


Previous Entry Share Next Entry
Greasemonkey script to fix SourceForge download links
pinkie pie
mendel
First, background: GreaseMonkey is a FireFox plugin that lets you add bits of DHTML ("user scripts") to any webpage to change its behavior or content. It's the Javascript equivalent of user CSS styles.

SourcePlease is a GreaseMonkey script I wrote to avoid having to click through two pages of mirror lists (and then be prompted for a file location) when you encounter a SourceForge download URL. It rewrites the URL to point directly to the file on a random mirror (unless a mirror is specified in the URL), ready to be clicked or copied-and-pasted or whatever you like.

Tell your SourceForge-frustrated friends!


  • 1
This is what lazy-as-virtue is about, sir. Well done.

If you're a paid SourceForge subscriber, one of the "perks" is a direct-download link. I guess SourcePlease will be useful for those folks who aren't subscribers, though. Cool!

But the links aren't written that way from the website, you still have to construct them yourself. It's mostly good for batch downloading and things like that, according to their documetnation (unless they've changed something in the past 3 months)

Actually, you do -- from the "Files" section on a SF project, if you're a subscriber, it puts a little "[direct download]" hyperlink next to the file. It's quite convenient for automating file pulls from SF projects, and the like.

Hm. I never noticed that when I first became a subscriber. I wonder if it's new, or if I just missed it.

Interesting. That was the last place I was thinking of when I threw this together, though, because there you're at least prepared to go through the additional steps. What gets me every time is when a project's website has a link that looks like it downloads a package, and you copy the link (that ends in ".tar.gz" or ".rpm" even!) and paste it into a wget command on the remote box you're working on, and you get an HTML page.

Flooterbuck's page is the example I kept testing on (see the download link), although it's even worse when the website you're looking at isn't in the SourceForge domain.

But if you link directly to the mirror, I think SF's download count stats won't be accurate (may not be a big deal for you).

  • 1
?

Log in

No account? Create an account