Thanks to visit codestin.com
Credit goes to github.com

Skip to content

surajkumar6/mentor

 
 

Repository files navigation

mentor

mentor is a GNU Emacs frontend for the rTorrent bittorrent client.

By default, it will start and run rTorrent from within Emacs but can also be configured to use an external rTorrent instance over XML-RPC.

This project aims to provide a feature complete and highly customizable interface, that will feel familiar to Emacs users. Key bindings are chosen to be as close to the vanilla rTorrent curses interface as possible.

mentor still has some way to go before it can really be considered a complete interface, so please moderate your expectations. It works fine for many common tasks though, and in some cases (dare we say?) much better than the standard ncurses interface.

Screenshot

doc/screenshot.png

Screenshot of moving a download and its data to another directory using ido integration. Sort your downloads in a breeze!

Features

Here is a summary of some of the features:

  • Show torrents in a table, with configurable columns.
  • Search torrents using C-s (no more of the manual up/down).
  • Mark and perform operations on more than one torrent at once.
  • Sort torrents according to one or more criteria.
  • Move downloads together with their data in one command.
  • Switch between views, create new etc. (like numbers)
  • Support for most standard operations. (Start/stop/rehash/move etc.)
  • Use all Emacs features you are used to: macros, Emacs lisp etc.

Quick Start

Make sure that you have rTorrent installed on your system.

To start mentor, just run:

M-x mentor

It should work out of the box, but you may want to do some additional configuration.

Key Bindings

Downloads

<DEL>Add torrent file or magnet URL
sStart download
dStop download
DRemove download
kClose download
KRemove download incl. data
rInitiate hash check
gUpdate screen
GRe-initialize information

Marking

mMark item
uUnmark item
MMark all items
UUnmark all items

Sorting

t cSort downloads by state
t DSort downloads by directory
t dSort downloads by dl speed
t nSort downloads by name
t pSort downloads by size
t tSort downloads by tied file name
t uSort downloads by ul speed

Misc

<RET>Enter file detail screen
RMove download data
CCopy download data
xCall XML-RPC command
qBury mentor
QShutdown mentor

Mapping from rTorrent commands to Mentor

Main view keys

rTorrentMentorDescription
-><RET>View download.
1 - 71 - 7Change view.
^SsStart download.
^D (1)dStop an active download.
^D (2)DRemove download.
^KkClose a torrent and its files.
n/aKRemove download including data.
^En/aSet ‘create/resize queued’ flags.
^RrInitiate hash check of torrent.
^OoChange the destination directory of the download.
^XxCall commands or change settings.
^Bn/aSet download to perform initial seeding.
+ / -+ / -Change the priority of the download.
<DEL><DEL>Add torrent using an URL or file path.
ln/aView log. Exit by pressing the space-bar.
Un/aDelete the file the torrent is tied to, and clear the association.
In/aToggle whether torrent ignores ratio settings.

Configuration

General

You can find additional Mentor options in customize.

M-x customize-group
mentor <RET>

Two very useful variables to customize are `mentor-rtorrent-download-directory’ and `mentor-rtorrent-keep-session’.

External rTorrent

If you are already running rTorrent outside of Emacs, it is easy to configure Mentor to use it.

Add this to your ~/.rtorrent.rc and restart rTorrent:

scgi_local = ~/.rtorrent-rpc.socket
xmlrpc_dialect = i8
encoding_list = UTF-8

Add this to your init.el and restart Emacs, or customize “Mentor Rtorrent External Rpc”:

(setq mentor-rtorrent-external-rpc "~/.rtorrent-rpc.socket")

You can also specify an absolute path:

;; Alternative 2: Absolute path
(setq mentor-rtorrent-external-rpc "/path/to/rtorrent-rpc.socket")

It is also possible to connect to rtorrent over http. There are instructions on configuring this on the rtorrent wiki.

;; Alternative 3: Use a web server
(setq mentor-rtorrent-external-rpc "http://127.0.0.1:8080/RPC2")

Finally, you can connect directly to rtorrent over scgi. However, anyone that can send rtorrent xmlrpc requests can in all likelihood also execute arbitrary code as the user running rtorrent. Therefore, this is inadvisable on anything but the loopback device (e.g. 127.0.0.1) on single-user systems.

It is almost always easier and better to use a Unix domain socket (file) as suggested above.

;; Alternative 4: Connect directly to rtorrent over scgi
(setq mentor-rtorrent-external-rpc "scgi://127.0.0.1:5000")

Configuring rtorrent

For more information on configuring rTorrent, refer to the rTorrent wiki.

Installing mentor

Installing through MELPA (recommended)

If you are using Emacs 24 or later you can install mentor using ELPA. It is available from MELPA. If you do not already have MELPA configured, add these lines to your init.el:

(add-to-list 'package-archives
 '("melpa" . "http://melpa.milkbox.net/packages/") t)

Evaluate these lines or restart Emacs. Next, find and install mentor using this command:

M-x package-list-packages

Installing mentor manually

If you for some reason do not use Emacs 24, or if you do not want to use ELPA, you can install mentor manually.

Clone the repository using:

git clone https://github.com/skangas/mentor.git

Add this to your init.el:

(add-to-list 'load-path "~/src/mentor/")
(require 'mentor)

Change “~/src/mentor” to the path where you keep the mentor source code.

Make sure you have xml-rpc.el installed, at least version 1.6.9.

If you wish to byte-compile mentor, go into the source directory and run:

make

Here is how you setup autoload. See the Emacs manual for more information on this.

(autoload 'mentor "mentor" nil t)

Known issues

  • There is no view for trackers/peers/extra information.
  • mentor currently has some performance issues if you have many torrents (several hundreds). Be aware.

Contact

You can find the latest version of mentor here:

http://www.github.com/skangas/mentor

Bug reports, comments, and suggestions are welcome! Send them to Stefan Kangas <[email protected]> or report them on GitHub.


http://melpa.milkbox.net/packages/mentor-badge.svg http://melpa-stable.milkbox.net/packages/mentor-badge.svg

About

GNU Emacs frontend for the rTorrent bittorrent client.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 92.1%
  • Python 7.4%
  • Makefile 0.5%