Last month I mused (and yes, “muse” is a verb) that a command-line download manager would be a nifty thing to have. It could run easily on the weakest of hardware, doing a job that doesn’t require much oomph, and certainly doesn’t require a huge system to perform.
Most conventional downloads are handled by the browser though, which means that a download “client” would have to be able to read a link, most likely from a text file, and do all the work that follows.
Blice on the Ubuntu Forums took up the idea, and has come up with fttps, which is a simple Python application that periodically reads the contents of a text file, downloads the links pasted there, and pushes the results into a specific location. It’s something that has been in the works for part of a month now, and the end product is very exciting.
Screenshot courtesy of a 750Mhz Thinkpad with a shattered display. ;) As you can see, fttps in its early state has a very simple interface controlled with the cursor keys, a file display and a progress bar. It shows elapsed time and time remaining, as well as a download rate and file progress.
It pauses downloads with the p key, resumes with r, and the x in brackets on the left indicates which file you’re controlling. When the file is finished, the download stops and the links pasted in the control file — fttps.queue — are removed.
You can configure the program with the fttpsettings.py file, and most of the settings there are self-explanatory. If you want to keep a text file open and just keep resaving it with new links, fttps is smart enough to check if a link has been downloaded already, and skip it if that’s the case.
You can also customize the display to show whatever information you prefer, or to omit the display altogether if you just want to run it in the background.
As an example of how to arrange it, I have fttps running on my rtorrent slave in a separate terminal window. That machine is an NFS server, and I keep the fttps.queue file in the same folder where I drop torrents — ~/watch. I can open the queue file from another machine, paste a link into it, save the file, and from across the room I can see that machine open the file and start downloading. When it’s finished, fttps puts the file in the same folder as rtorrent puts its downloaded files.
A side bonus is that if I want to seed a torrent that I can actually download faster with a direct link (yes, that is sometimes the case when you’re on a residential-to-fiber optic line :twisted: ) I can hand the download link to fttps, and give the torrent to rtorrent when the file is finished. rtorrent will check the file integrity and start seeding immediately, and I don’t have to wait for peers to connect to. It’s instamatic!
It sounds like Blice is eager to get feedback on the program, and to get suggestions for new features. I already mentioned md5 checks, but that might be an extra step if the hash code has to be copied into a different file. It might also need some additional controls or the ability to resume broken downloads. If you have ideas, relay them through the Ubuntu Forums.
And if you’re a coder, you might see if Blice wants help putting it together. This is one of those rare opportunities to join a project at the ground level, in a slender niche that seems to be thus far unattended. You might be breaking new ground. It’s so fresh, it doesn’t even have version numbers yet. ;)
If I have time in the next few days, I’m going to rewire my ancient Fujitsu laptop, and see if I can get it running as the download client. It will be slow and the hard drive is way too small to be a practical host for this, but in the interest of science, it needs to be done. :mrgreen:
P.S.: I expect, since this is Python-based, it will run on other operating systems aside from Linux. Report in, if it’s working for you. … ;)
Edit, 2009-12-27: As Xyzzy mentions below, it appears blice’s site has gone offline, taking the source code for fttps with it. But, your friendly neighborhood K.Mandla, with nerves of steel and a certain foresight about things disappearing from the Internet, had the mental wherewithal to stash copies of all the “releases” blice made. Here is the link for the most recent version (the “0.4″ numbering is mine alone; blice posted three earlier versions before that one) that has the pause and restart options; if you want earlier ones (I can’t imagine why) let me know and I will furnish links. Cheers!