Added man pages.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@475 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-06-25 21:50:32 +00:00
parent 088398d6d6
commit 28b369dc83
11 changed files with 463 additions and 175 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
SUBDIRS = src
SUBDIRS = \
doc \
src
EXTRA_DIST= \
autogen.sh \
-4
View File
@@ -15,7 +15,3 @@ Make accumulate return the value, no refs please...
> created from rtorrent. Like when you start a torrent, but it is too
> slow or broken or for various reasons you don't want to download it.
Seperate download management from core::management.
Recheck hash key.
+1
View File
@@ -28,6 +28,7 @@ AC_DEFINE(HAVE_CONFIG_H, 1, true if config.h was included)
AC_OUTPUT([
Makefile
doc/Makefile
src/Makefile
src/core/Makefile
src/display/Makefile
+1
View File
@@ -0,0 +1 @@
man_MANS = rtorrent.1
-158
View File
@@ -1,158 +0,0 @@
////////////////
// rtorrent.1.txt
// Asciidoc source for rtorrent manpage
// Lee Bigelow <ligelowbee@yahoo.com>
// Use as you will.
//
// processed to manpage with:
// asciidoc -b docbook -d manpage rtorrent.1.txt
// docbook2x-man rtorrent.1.xml
// (or use: xmlto man rtorrent.xml)
// processed to html with:
// asciidoc -b css-embedded -d manpage rtorrent.1.txt
////////////////
RTORRENT(1)
===========
Jari Sundell <jaris@ifi.uio.no>
v0.1.5, 9 April 2005
NAME
----
rtorrent - rakshasa's ncurses bittorrent client using libtorrent
SYNOPSIS
--------
*rtorrent* [-b ip] [-i ip] [-p portrange] [-d directory] [-s directory] [-h]
DESCRIPTION
-----------
The rtorrent command starts a ncurses based bittorrent downloading front-end
that uses libtorrent to control multiple bittorrent downloads.
OPTIONS
-------
-b <a.b.c.d>::
Bind the listening socket to this IP.
-i <a.b.c.d>::
Set the IP address sent to the tracker.
-p <a-b>::
Open a port in the range a to b.
-s <dir>::
Use <dir> as the session directory. The torrents will be
saved with the info-hash in hex as the filename.
KEYBOARD CONTROLS
-----------------
All:
~~~~
....................................
Ctrl-q Quit
a Increase Throttle by 1 KiB
z Decrease Throttle by 1 KiB
s Increase Throttle by 5 KiB
x Decrease Throttle by 5 KiB
d Increase Throttle by 50 KiB
c Decrease Throttle by 50 KiB
....................................
In main window:
~~~~~~~~~~~~~~~
.............
Backspace Activate text input for inserting urls/file
paths. Arrows/C^f/C^b for navigation, enter/C^m.
Up/Down Select torrent
Right View torrent
Ctrl-s Start torrent
Ctrl-d Stop/delete torrent
...............
In torrent view:
~~~~~~~~~~~~~~~~
...............
Up/Down Select peer
Left Back to main
Right View files
p View peer
o View trackers
1 Decrease max uploads
2 Increase max uploads
3 Decrease min peers connected
4 Increase min peers connected
5 Decrease max peers connected
6 Increase max peers connected
t Query tracker
* Snub peer
.............
In file view:
~~~~~~~~~~~~~
............
Up/Down Select file
Left Back to torrent view
SpaceBar Change file priority
............
RESOURCES
---------
Homepage for libtorrent and rtorrent::
* http://libtorrent.rakshasa.no[]
Mailing list for libtorrent and rtorrent::
* Go to http://rakshasa.no/mailman/listinfo/libtorrent-devel[] to
subscribe to the mailing list
* Send your emails to the list at <mailto:libtorrent-devel@rakshasa.no[]>
COPYING
-------
Copyright (C) 2005 Jari Sundell
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
AUTHOR
------
Jari Sundell <mailto:jaris@ifi.uio.no[]>
BUGS
----
Send bug reports to the authors email address or to the mailing list for libtorrent.
+439
View File
@@ -0,0 +1,439 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<refentry id="freecell">
<refmeta>
<refentrytitle>rtorrent</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="date">June 25th, 2005</refmiscinfo>
<refmiscinfo class="source"></refmiscinfo>
<refmiscinfo class="title">BitTorrent client for ncurses</refmiscinfo>
</refmeta>
<refnamediv>
<refname>rtorrent</refname>
<refpurpose>a BitTorrent client for ncurses</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>rtorrent</command>
<arg choice="opt">-h</arg>
<arg choice="opt">-o key1=opt1,...</arg>
<arg choice="opt" rep="repeat">URL | FILE</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>rtorrent</command> is a BitTorrent client for ncurses,
using the <emphasis>libtorrent</emphasis> library. The client
and library is written in C++ with emphasis on speed and
efficiency, while delivering equivalent features to those found
in GUI based clients in an ncurses client.
</para>
</refsect1>
<refsect1>
<title>KEYBOARD CONTROL</title>
<para>
</para>
<refsect2>
<title>Global Keys</title>
<variablelist>
<varlistentry>
<term>^q</term>
<listitem><para>
Initiate shutdown, press again to force the shutdown and
skip sending the stop signal to trackers.
</para></listitem>
</varlistentry>
<varlistentry>
<term>up | down</term>
<listitem><para>
Select item.
</para></listitem>
</varlistentry>
<varlistentry>
<term><-</term>
<listitem><para>
Go back to the previous screen.
</para></listitem>
</varlistentry>
<varlistentry>
<term>a | s | d</term>
<listitem><para>
Increase the upload throttle by 1/5/50 KB.
</para></listitem>
</varlistentry>
<varlistentry>
<term>A | S | D</term>
<listitem><para>
Increase the download throttle by 1/5/50 KB.
</para></listitem>
</varlistentry>
<varlistentry>
<term>z | x | c</term>
<listitem><para>
Decrease the upload throttle by 1/5/50 KB.
</para></listitem>
</varlistentry>
<varlistentry>
<term>Z | X | C</term>
<listitem><para>
Decrease the download throttle by 1/5/50 KB.
</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>Main View Keys</title>
<variablelist>
<varlistentry>
<term>-></term>
<listitem><para>
View download.
</para></listitem>
</varlistentry>
<varlistentry>
<term>^s</term>
<listitem><para>
Start download.
</para></listitem>
</varlistentry>
<varlistentry>
<term>^d</term>
<listitem><para>
Stop an active download, or remove a stopped download.
</para></listitem>
</varlistentry>
<varlistentry>
<term>^r</term>
<listitem><para>
Initiate hash check of torrent.
</para></listitem>
</varlistentry>
<varlistentry>
<term>backspace</term>
<listitem><para>
Add torrent using an URL or file path. Use
<emphasis>tab</emphasis> to view directory content and do
autocomplete.
</para></listitem>
</varlistentry>
<varlistentry>
<term>l</term>
<listitem><para>
View log. Exit by pressing the spacebar.
</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>Download View Keys</title>
<variablelist>
<varlistentry>
<term>-></term>
<listitem><para>
View torrent file list. Use the spacebar to change file
priorities.
</para></listitem>
</varlistentry>
<varlistentry>
<term>1 | 2</term>
<listitem><para>
Adjust max uploads.
</para></listitem>
</varlistentry>
<varlistentry>
<term>3 | 4</term>
<listitem><para>
Adjust min peers.
</para></listitem>
</varlistentry>
<varlistentry>
<term>5 | 6</term>
<listitem><para>
Adjust max peers.
</para></listitem>
</varlistentry>
<varlistentry>
<term>o</term>
<listitem><para>
Display the tracker list. Cycle the trackers in a group
with the spacebar.
</para></listitem>
</varlistentry>
<varlistentry>
<term>p</term>
<listitem><para>
View peer and torrent information.
</para></listitem>
</varlistentry>
<varlistentry>
<term>t | T</term>
<listitem><para>
Initiate tracker request. Use capital T to force the
request, ignoring the "min interval".
</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>-b <replaceable>a.b.c.d</replaceable></term>
<listitem><para>
Bind listening socket and outgoing connections to this
network interface address.
</para></listitem>
</varlistentry>
<varlistentry>
<term>-d <replaceable>directory</replaceable></term>
<listitem><para>
Set the default download directory. Defaults to "./".
</para></listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem><para>
Display help and exit.
</para></listitem>
</varlistentry>
<varlistentry>
<term>-i <replaceable>a.b.c.d</replaceable></term>
<listitem><para>
Set the address reported to the tracker.
</para></listitem>
</varlistentry>
<varlistentry>
<term>-o key1=opt1,...</term>
<listitem><para>
Set any number of options, see the
SETTINGS section. The options given here
override the resource files.
</para></listitem>
</varlistentry>
<varlistentry>
<term>-p <replaceable>a-b</replaceable></term>
<listitem><para>
Try to open a listening port in the range
<emphasis>a</emphasis> up to and including
<emphasis>b</emphasis>.
</para></listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable>directory</replaceable></term>
<listitem><para>
Session management will be enabled and the torrent files for
all open downloads will be stored in this directory. Only
one instance of rtorrent should be used with each session
directory, though at the moment no locking is done.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>GENERAL SETTINGS</title>
<para>
</para>
<variablelist>
<varlistentry>
<term>max_peers = <replaceable>value</replaceable></term>
<listitem><para>
Set the maximum number of peers to allow in each download.
</para></listitem>
</varlistentry>
<varlistentry>
<term>min_peers = <replaceable>value</replaceable></term>
<listitem><para>
Set the minimum number of peers to try to connect to in each
download.
</para></listitem>
</varlistentry>
<varlistentry>
<term>max_uploads = <replaceable>value</replaceable></term>
<listitem><para>
Set the maximum number of simultanious uploads per download.
</para></listitem>
</varlistentry>
<varlistentry>
<term>download_rate = <replaceable>KB</replaceable></term>
<listitem><para>
Set the maximum global download rate.
</para></listitem>
</varlistentry>
<varlistentry>
<term>upload_rate = <replaceable>kb</replaceable></term>
<listitem><para>
Set the maximum global upload rate.
</para></listitem>
</varlistentry>
<varlistentry>
<term>bind = <replaceable>a.b.c.d</replaceable></term>
<listitem><para>
Bind listening socket and outgoing connections to this
network interface address.
</para></listitem>
</varlistentry>
<varlistentry>
<term>ip = <replaceable>a.b.c.d</replaceable></term>
<listitem><para>
Set the address reported to the tracker.
</para></listitem>
</varlistentry>
<varlistentry>
<term>port = <replaceable>a-b</replaceable></term>
<listitem><para>
Try to open a listening port in the range
<emphasis>a</emphasis> up to and including
<emphasis>b</emphasis>.
</para></listitem>
</varlistentry>
<varlistentry>
<term>check_hash = <replaceable>yes | no</replaceable></term>
<listitem><para>
Perform hash check on finished downloads.
</para></listitem>
</varlistentry>
<varlistentry>
<term>directory = <replaceable>directory</replaceable></term>
<listitem><para>
Set the default download directory. Defaults to "./".
</para></listitem>
</varlistentry>
<varlistentry>
<term>session = <replaceable>directory</replaceable></term>
<listitem><para>
Session management will be enabled and the torrent files for
all open downloads will be stored in this directory. Only
one instance of rtorrent should be used with each session
directory, though at the moment no locking is done.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>ADVANCED SETTINGS</title>
<para>
This list contains settings normal users shouldn't need to touch.
</para>
<variablelist>
<varlistentry>
<term>hash_read_ahead = <replaceable>MB</replaceable></term>
<listitem><para>
Configure how far ahead we ask the kernel to read when doing
hash checking. The hash checker uses madvise(...,
MADV_WILLNEED) for the requests.
</para></listitem>
</varlistentry>
<varlistentry>
<term>max_open_files = <replaceable>value</replaceable></term>
<listitem><para>
Number of files to simultaniously keep open. Libtorrent
dynamicly opens and closes files when mapping files to
memory.
</para></listitem>
</varlistentry>
<varlistentry>
<term>tracker_dump = <replaceable>yes | no</replaceable></term>
<listitem><para>
Dump data received from trackers to the files
"./tracker_dump.*".
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>AUTHORS</title>
<para>
<simplelist type="vert">
<member>Jari "Rakshasa" Sundell <email>jaris@ifi.uio.no</email></member>
</simplelist>
</para>
</refsect1>
</refentry>
+2 -1
View File
@@ -1,5 +1,6 @@
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed.
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# Minumum amount of peers to connect per torrent, if available.
#min_peers = 40
+8 -7
View File
@@ -118,21 +118,22 @@ parse_options(ui::Control* c, OptionHandler* optionHandler, int argc, char** arg
void
initialize_option_handler(ui::Control* c, OptionHandler* optionHandler) {
optionHandler->insert("max_peers", new OptionHandlerInt(c, &apply_download_max_peers, &validate_download_peers));
optionHandler->insert("max_uploads", new OptionHandlerInt(c, &apply_download_max_uploads, &validate_download_peers));
optionHandler->insert("min_peers", new OptionHandlerInt(c, &apply_download_min_peers, &validate_download_peers));
optionHandler->insert("max_uploads", new OptionHandlerInt(c, &apply_download_max_uploads, &validate_download_peers));
optionHandler->insert("download_rate", new OptionHandlerInt(c, &apply_global_download_rate, &validate_rate));
optionHandler->insert("hash_read_ahead", new OptionHandlerInt(c, &apply_hash_read_ahead, &validate_read_ahead));
optionHandler->insert("max_open_files", new OptionHandlerInt(c, &apply_max_open_files, &validate_fd));
optionHandler->insert("upload_rate", new OptionHandlerInt(c, &apply_global_upload_rate, &validate_rate));
optionHandler->insert("check_hash", new OptionHandlerString(c, &apply_check_hash, &validate_yes_no));
optionHandler->insert("directory", new OptionHandlerString(c, &apply_download_directory, &validate_directory));
optionHandler->insert("tracker_dump", new OptionHandlerString(c, &apply_tracker_dump, &validate_yes_no));
optionHandler->insert("bind", new OptionHandlerString(c, &apply_bind, &validate_ip));
optionHandler->insert("ip", new OptionHandlerString(c, &apply_ip, &validate_ip));
optionHandler->insert("port", new OptionHandlerString(c, &apply_port_range, &validate_port_range));
optionHandler->insert("check_hash", new OptionHandlerString(c, &apply_check_hash, &validate_yes_no));
optionHandler->insert("directory", new OptionHandlerString(c, &apply_download_directory, &validate_directory));
optionHandler->insert("hash_read_ahead", new OptionHandlerInt(c, &apply_hash_read_ahead, &validate_read_ahead));
optionHandler->insert("max_open_files", new OptionHandlerInt(c, &apply_max_open_files, &validate_fd));
optionHandler->insert("tracker_dump", new OptionHandlerString(c, &apply_tracker_dump, &validate_yes_no));
}
void
+4 -4
View File
@@ -76,7 +76,7 @@ DownloadList::DownloadList(Control* c) :
}
DownloadList::~DownloadList() {
if (m_window != m_control->get_display().end())
if (is_active())
throw std::logic_error("ui::DownloadList::~DownloadList() called on an active object");
std::for_each(m_uiArray, m_uiArray + DISPLAY_MAX_SIZE, rak::call_delete<ElementBase>());
@@ -93,7 +93,7 @@ DownloadList::~DownloadList() {
void
DownloadList::activate() {
if (m_window != m_control->get_display().end())
if (is_active())
throw std::logic_error("ui::Download::activate() called on an already activated object");
utils::taskScheduler.insert(&m_taskUpdate, utils::Timer::cache() + 1000000);
@@ -115,7 +115,7 @@ DownloadList::activate() {
void
DownloadList::disable() {
if (m_window == m_control->get_display().end())
if (!is_active())
throw std::logic_error("ui::Download::disable() called on an already disabled object");
disable_display();
@@ -141,7 +141,7 @@ DownloadList::disable() {
void
DownloadList::activate_display(Display d) {
if (m_window == m_control->get_display().end())
if (!is_active())
throw std::logic_error("ui::DownloadList::activate_display(...) could not find previous display iterator");
if (d >= DISPLAY_MAX_SIZE)
+2
View File
@@ -77,6 +77,8 @@ public:
input::Bindings& get_bindings() { return *m_bindings; }
bool is_active() const { return m_window != m_control->get_display().end(); }
void activate();
void disable();
+3
View File
@@ -43,6 +43,9 @@ Root::init() {
void
Root::cleanup() {
if (m_downloadList->is_active())
m_downloadList->disable();
delete m_downloadList;
m_control->get_input().erase(&m_bindings);