Is there any bittorrent client or (Java|Python|Ruby|Perl) library that I can use like wget or curl?
I would like to use simply as a step in a script, like you would use wget.
EDIT: Sorry, I should have mentioned I'm using Ubuntu.
Is there any bittorrent client or (Java|Python|Ruby|Perl) library that I can use like wget or curl?
I would like to use simply as a step in a script, like you would use wget.
EDIT: Sorry, I should have mentioned I'm using Ubuntu.
You can load torrents in rtorrent from the command line.
wget terminates after a download. You can add the exit command to the on_finished event in your .rtorrent.rc.
If you need to run the application in the background, you can use the screen management utility, or the & operator.
If you want to watch the file download, you would simply omit the screen management.
Another solution is to get rtorrent to watch a directory for torrents. When a download is complete, you can specify which directory it will get moved to. To start a download, you move your file into the watch directory with your script, and check for its completion status by checking the "completed" directory for files.
ctorrent
SYNOPSIS
ctorrent [General Options] [Download Options] [Make Torrent
Options] file.torrent
CTorrent is a BitTorrent Client written in C that doesn’t
require any graphical component, such as an X server. It’s built as a
console program and it can be even used remotely in a machine that
provides outside ssh access.
btdownloadheadless
SYNOPSIS
btdownloadheadless [ option ... ] URL
btdownloadheadless [ option ... ] filename
Another option is the official "BitTorrent" client (prior to version 6, of course) from bittorrent.com. It contains both a console and a curses version. It's usually called the bittorrent package (instead of the bittorrent-gui package, which is the GUI version) in various Linux distros. The latest for Linux is 5.x, although Ubuntu/Debian only has 3.x. Run bittorrent-console or bittorrent-curses for the console and curses versions, respectively (on 4.x and 5.x); or btdownloadheadless.bittorrent or btdownloadcurses.bittorrent (on 3.x).
I've used btdownloadheadless from the bittornado package as suggested by gnibbler. I also recommend using screen with btdownloadcurses for a nice display of progress, etc., that you can easily background.