twistedfall Posted October 3, 2010 Report Share Posted October 3, 2010 I have written cross-platform command line client utility to access µTorrent WebUI. It is now increasingly useful as Linux µTorrent server is out, though it supports both server and desktop WebUIs. So I thought to share it with the community.Homepage: http://github.com/twistedfall/utorrentctlUtility itself: http://github.com/twistedfall/utorrentctl/raw/master/utorrentctl.pyREADME: http://github.com/twistedfall/utorrentctl/blob/master/READMEYou will want to also get http://github.com/twistedfall/utorrentctl/raw/master/config.py to have your connection parameters pre-set to your own values.It is written in Python 3.1, so you will need an interpreter for it. Any modern Linux distro already has it (or it is installable from repo), Windows and Mac OS X users cat get it at: http://www.python.org/download/. I would like to get some non-Linux testing.The API coverage it not yet complete, meaning you won't be able to do everything WebUI can, but I will try to improve it. But there are things you can do with utorrentctl that WebUI can't. For example removing torrent with data and torrent file and choosing download location for a single torrent.Please feel free to ask any questions should they arise. Link to comment Share on other sites More sharing options...
lithopsian Posted October 3, 2010 Report Share Posted October 3, 2010 Very nice! I just came here to share some shell scripts I'd written to handle simple tasks like adding a magnet link and pausing all the torrents without having to fire up webui (not that the Linux webui handles add URL yet!), but this is much more complete and polished. Very handy to associate the Linux command with the magnet protocol in Firefox and automatically load any magnet link you click I haven't gone through all your API yet, but does it have commands to report basic stats like the current download rate? Link to comment Share on other sites More sharing options...
twistedfall Posted October 4, 2010 Author Report Share Posted October 4, 2010 Currently you can only get this info per torrent: utorrentctl -l -v or via torrent_list() call. Overall statistics will be included soon. Link to comment Share on other sites More sharing options...
agentblueuk Posted October 4, 2010 Report Share Posted October 4, 2010 Any chance of a python 2.6 compatible version ? Link to comment Share on other sites More sharing options...
twistedfall Posted October 4, 2010 Author Report Share Posted October 4, 2010 Well, maybe, but definitely not before it covers 100% of API — porting full version is easier than developing both simultaneously. What distribution are you running? Maybe I can help you with installing Python 3. Link to comment Share on other sites More sharing options...
agentblueuk Posted October 4, 2010 Report Share Posted October 4, 2010 fedora 12I had a look and there are no python3 rpms Link to comment Share on other sites More sharing options...
twistedfall Posted October 4, 2010 Author Report Share Posted October 4, 2010 I see, it seems that the only solid solution is to upgrade to F13 Link to comment Share on other sites More sharing options...
twistedfall Posted October 13, 2010 Author Report Share Posted October 13, 2010 I have added total speed info to the bottom of verbose torrent list (utorrentctl -l -v) Link to comment Share on other sites More sharing options...
The Mighty Buzzard Posted October 13, 2010 Report Share Posted October 13, 2010 Cheers. Appreciate the effort. Link to comment Share on other sites More sharing options...
twistedfall Posted October 17, 2010 Author Report Share Posted October 17, 2010 Another bump. Optimized network usage (info about several torrents is now fetched in a single request, had to hack json a little to achieve this) added --all option to perform operation on all torrents at once, added ability to display torrent job info (upload/download limits, trackers, etc.), verbose is now enabled by default (use -V to reverse), library API and cli options are changed in several places, be aware, see --help for a list of actual options Link to comment Share on other sites More sharing options...
The Mighty Buzzard Posted October 17, 2010 Report Share Posted October 17, 2010 Again, cheers. Any idea on when you'll be adding tags to the client? If it's something you've already gotten started on or plan to do in the next few days, great. If not I may see about adding it to the latest version this week and post the patch up here. Link to comment Share on other sites More sharing options...
twistedfall Posted October 17, 2010 Author Report Share Posted October 17, 2010 Do you mean labels? Library already supports them: each torrent has label field and you can receive label list with torrent_list( labels ), but cli utility doesn't yet show any labels. I will try to implement them the following week (the one that starts on 18 of October ). But patches are always welcome! Link to comment Share on other sites More sharing options...
The Mighty Buzzard Posted October 17, 2010 Report Share Posted October 17, 2010 Yeah, Labels. I was talking more about setting them than retrieving them but both are handy.Looks like you haven't used the setprops call in the library so far, so I'll see about following your coding style and getting at the very least labels implemented tomorrow or Tuseday. I might just go through the entire list of possibilities for setprops while I'm at it though. Link to comment Share on other sites More sharing options...
The Mighty Buzzard Posted October 18, 2010 Report Share Posted October 18, 2010 Huh, easier than I thought for never having touched python before. Definitely never going to be my favorite language but I've seen worse. Labels are working, I'll go through the rest of setprops as I get time/the desire.Link: patchOh, have a look at torrent_set_label if you would? It's currently making a request for each hash supplied because done like torrent_[start|stop|pause|etc...] it only changes the label of the last hash supplied. It's almost certainly something exceedingly simple but I've exhausted my patience for the night. Link to comment Share on other sites More sharing options...
twistedfall Posted October 18, 2010 Author Report Share Posted October 18, 2010 Great! I have committed your patch. Though I will implement more generalized torrent properties change in near future so will probably rework it in some way.Also I have added torrent sorting via -s, --sort and again made some minor adjustments in cli arguments Link to comment Share on other sites More sharing options...
twistedfall Posted October 21, 2010 Author Report Share Posted October 21, 2010 Added ability to download files from the uTorrent server and generate magnet links from available torrents. Also beware, some command line switches changed to improve experience. For example login info switches are all uppercase now, -F is synonym to --force and can be used in place of --data --torrent when removing torrents, -f and -I is merged into -i Link to comment Share on other sites More sharing options...
twistedfall Posted October 25, 2010 Author Report Share Posted October 25, 2010 Another update, added ability to set torrent properties (labels, upload/download speed), list filtering by label, batch file priority setting, torrent list caching (so that two consecutive requests to torrent_list() will use less traffic), ability to see complete torrent info with --dump Link to comment Share on other sites More sharing options...
nixgear Posted October 28, 2010 Report Share Posted October 28, 2010 Im having issues getting this to work. Do you need specific version of utorrent and webui??I am running WebUI 3.71, utorrent 2.2 beta and win7 64bit.I keep getting an error in line 434."resp = self.getresponse()" Link to comment Share on other sites More sharing options...
twistedfall Posted October 28, 2010 Author Report Share Posted October 28, 2010 Could you please provide the full error message that is displayed? Link to comment Share on other sites More sharing options...
bdelcamp Posted November 7, 2010 Report Share Posted November 7, 2010 I keep getting an invalid syntax:mortis% python utorrentctl.py --help File "utorrentctl.py", line 267 return { k : str( getattr( self, k ) ) for k in self.get_sortable_attrs() } ^SyntaxError: invalid syntaxRunning Ubuntu Server 10.10 with python 3.1 Link to comment Share on other sites More sharing options...
twistedfall Posted November 8, 2010 Author Report Share Posted November 8, 2010 I keep getting an invalid syntax:mortis% python utorrentctl.py --helpYou should run it either like:python3 utorrentctl.py --helpor make it executable:chmod +x utorrentctl.pyand then run just like any executable file:./utorrentctl.py --helpAll above supposes that python3 in Ubuntu is installed with python3 binary name. Please let me know if it helps. Link to comment Share on other sites More sharing options...
bdelcamp Posted November 8, 2010 Report Share Posted November 8, 2010 Yup, that worked. python is pretty much the only language I'm not familiar with, so I just assumed having only python 3.1 installed would default to that binary. Thanks! Link to comment Share on other sites More sharing options...
twistedfall Posted November 12, 2010 Author Report Share Posted November 12, 2010 Update with fixed bug showing infohash of added torrent with unicode file paths, also relative dir with --add now works as expected intuitively. So to get the old behavior you now need to specify '../movie' instead of just 'movie' Link to comment Share on other sites More sharing options...
twistedfall Posted November 22, 2010 Author Report Share Posted November 22, 2010 Added support for latest uTorrent 2.2 and Falcon (and some API changes because of Falcon) Link to comment Share on other sites More sharing options...
twistedfall Posted December 26, 2010 Author Report Share Posted December 26, 2010 Added rss support. It's still not quite the way I see it, but it's working. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.