fttps: A command-line download manager

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 😈 ) 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!

15 thoughts on “fttps: A command-line download manager

  1. Micah F

    Wow! I was just thinking about doing this exact same thing with a bash script. I’m going to try this instead

  2. barrucadu

    Nice script, I’ll have a look at it; I generally use wget for downloading things, but something like this would be much better!

  3. Pingback: » You are a Download Fiend if…

  4. Pingback: GoblinX Project » Newsletter Issue 181, News & Note

  5. Pingback: Tripartite, and only 750Mhz too « Motho ke motho ka botho

  6. Pingback: mdev and Xvesa for ultralight systems « Motho ke motho ka botho

  7. Pingback: A small achievement « Motho ke motho ka botho

  8. Pingback: Role reversal « Motho ke motho ka botho

  9. Pingback: On the menu « Motho ke motho ka botho

  10. Xyzzy

    I went to download it, and got a 404. Searching the web in in case the project moved only found links back to this page. Back to wget, I guess…

    1. K.Mandla Post author

      Thanks for the note; I have the source tarball and I’ll upload it now. Sad that it’s gone, but it won’t be the first “dead” project I will have given a home. …

  11. Pingback: No, terminal apps are not dying « Motho ke motho ka botho

  12. Pingback: A day at the races: aria2 vs. axel « Motho ke motho ka botho

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s