Changeset 6324


Ignore:
Timestamp:
Jul 11, 2008, 6:14:09 PM (13 years ago)
Author:
charles
Message:

(daemon) more cleanup work on remote's help and manpage

Location:
trunk/daemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/remote.c

    r6316 r6324  
    4646"       "MY_NAME" [host:port] [options]\n"
    4747"\n"
    48 "Notes:\n"
    49 "  <files> can be 'all', a single index, or a comma-separated list.\n"
    50 "  <torrents> can be 'all', a torrent id or hash string, or a comma-separated list of ids and hash strings.\n"
    51 "\n"
    52 "Examples:\n"
    53 "  \""MY_NAME" -l\" (list all torrents)\n"
    54 "  \""MY_NAME" -tall --start\" (start all torrents)\n"
    55 "  \""MY_NAME" --add ~/Desktop/*torrent\" (add all the torrent files in $HOME/Desktop)\n"
    56 "  \""MY_NAME" -t1 -i\" (get detailed information on the torrent whose id is '1')\n"
    57 "  \""MY_NAME" -t1 -Gall -g2,4,6\" (same torrent; only download the second, fourth, and sixth files)\n"
    58 "  \""MY_NAME" -tall -ph1,2\" (set all torrent's first two files' priorities to high)\n"
    59 "  \""MY_NAME" -tall -pnall\" (set all torrent's files' priorities to normal)";
     48"See the man page for detailed explanations and many examples.";
    6049}
    6150
     
    6655    { 'd', "downlimit",    "Set the maximum download speed in KB/s", "d", 1, "<number>" },
    6756    { 'D', "no-downlimit", "Don't limit the download speed", "D", 0, NULL },
    68     { 'e', "encryption",   "Set encryption mode [required, preferred, tolerated]", "e", 1, "<mode>" },
    69     { 'f', "files",        "Get a file list for the current torrent(s)", "f", 0, NULL },
     57    { 910, "encryption-required", "Encrypt all peer connections", "er", 0, NULL },
     58    { 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", 0, NULL },
     59    { 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", 0, NULL },
     60    { 'f', "files",        "List the current torrent's files", "f", 0, NULL },
    7061    { 'g', "get",          "Mark files for download", "g", 1, "<files>" },
    7162    { 'G', "no-get",       "Mark files for not downloading", "G", 1, "<files>" },
     
    7566    { 'm', "portmap",      "Enable portmapping via NAT-PMP or UPnP", "m", 0, NULL },
    7667    { 'M', "no-portmap",   "Disable portmapping", "M", 0, NULL },
    77     { 'n', "auth",         "Set username for authentication", "n", 1, "<user>:<pass>" },
     68    { 'n', "auth",         "Set username for authentication", "n", 1, "<auth>" },
    7869    { 'p', "port",         "Port to listen for incoming peers", "p", 1, "<port>" },
    79     { 900, "priority-high", "Set one or more files' priority as high", "ph", 1, "<files>" },
    80     { 901, "priority-normal", "Set one or more files' priority as normal", "pn", 1, "<files>" },
    81     { 902, "priority-normal", "Set one or more files' priority as low", "pl", 1, "<files>" },
     70    { 900, "priority-high", "Set the files' priorities as high", "ph", 1, "<files>" },
     71    { 901, "priority-normal", "Set the files' priorities as normal", "pn", 1, "<files>" },
     72    { 902, "priority-normal", "Set the files' priorities as low", "pl", 1, "<files>" },
    8273    { 'r', "remove",       "Remove the current torrent(s)", "r", 0, NULL },
    8374    { 's', "start",        "Start the current torrent(s)", "s", 0, NULL },
     
    8778    { 'U', "no-uplimit",   "Don't limit the upload speed", "U", 0, NULL },
    8879    { 'v', "verify",       "Verify the current torrent(s)", "v", 0, NULL },
    89     { 'w', "download-dir", "Set the download folder for new torrents", "w", 1, "<path>" },
     80    { 'w', "download-dir", "Set the default download folder", "w", 1, "<path>" },
    9081    { 'x', "pex",          "Enable peer exchange (PEX)", "x", 0, NULL },
    9182    { 'X', "no-pex",       "Disable peer exchange (PEX)", "X", 0, NULL },
     
    225216                      tr_bencDictAddInt( args, "speed-limit-down-enabled", 0 );
    226217                      break;
    227             case 'e': tr_bencDictAddStr( &top, "method", "session-set" );
    228                       tr_bencDictAddStr( args, "encryption", optarg );
    229                       break;
    230218            case 'f': tr_bencDictAddStr( &top, "method", "torrent-get" );
    231219                      tr_bencDictAddInt( &top, "tag", TAG_FILES );
     
    321309                      addIdArg( args, id );
    322310                      addFiles( args, "priority-low", optarg );
     311                      break;
     312            case 910: tr_bencDictAddStr( &top, "method", "session-set" );
     313                      tr_bencDictAddStr( args, "encryption", "required" );
     314                      break;
     315            case 911: tr_bencDictAddStr( &top, "method", "session-set" );
     316                      tr_bencDictAddStr( args, "encryption", "preferred" );
     317                      break;
     318            case 912: tr_bencDictAddStr( &top, "method", "session-set" );
     319                      tr_bencDictAddStr( args, "encryption", "tolerated" );
    323320                      break;
    324321            default:  fprintf( stderr, "got opt [%d]\n", (int)c );
  • trunk/daemon/transmission-remote.1

    r6316 r6324  
    1616.Op Fl d Ar number
    1717.Op Fl D
    18 .Op Fl e Ar mode
     18.Op Fl er
     19.Op Fl ep
     20.Op Fl et
    1921.Op Fl f
    2022.Op Fl g Ar files
     
    7072Remove the download limit.
    7173
    72 .It Fl e Fl -encryption Ar required
    73 Require all peer connections to be encrypted.
    74 .It Fl e Fl -encryption Ar preferred
     74.It Fl er Fl -encryption-required
     75Encrypt all peer connections.
     76.It Fl ep Fl -encryption-preferred
    7577Prefer encrypted peer connections.
    76 .It Fl e Fl -encryption Ar tolerated
     78.It Fl et Fl -encryption-tolerated
    7779Prefer unencrypted peer connections.
    7880
     
    104106Disable portmapping
    105107
    106 .It Fl n Fl -auth Ar user:pass
    107 .Ar Username
     108.It Fl n Fl -auth Ar username:password
     109Set the
     110.Ar username
    108111and
    109112.Ar password
     
    150153or
    151154.Ar hash .
     155To set more than one current torrent, joined their ids or hashes together in a comma-delimited list,
     156such as "-t1,2,3"
    152157
    153158.It Fl u Fl -uplimit Ar limit
     
    166171as the default location for newly added torrents to download files to.
    167172
    168 .It Fl x
     173.It Fl x Fl -pex
    169174Enable peer exchange (PEX).
    170 .It Fl X
     175.It Fl X Fl -no-pex
    171176Disable peer exchange (PEX).
    172177
     
    174179.Sh EXAMPLES
    175180
    176 List all torrents:
    177 .Pp
    178 .Dl $ transmission-remote -l
    179 .Pp
     181List all torrents' IDs and states:
     182.Bd -literal -offset indent
     183$ transmission-remote -l
     184.Ed
     185
     186List all torrents from a remote session that requires authentication:
     187.Bd -literal -offset indent
     188$ transmission-remote host:9091 --auth=username:password -l
     189.Ed
    180190
    181191Start all torrents:
    182 .Pp
    183 .Dl $ transmission-remote -tall --start
    184 .Pp
     192.Bd -literal -offset indent
     193$ transmission-remote -tall --start
     194.Ed
     195
     196Add two torrents:
     197.Bd -literal -offset indent
     198$ transmission-remote -a one.torrent two.torrent
     199.Ed
     200
     201Add all torrents in ~/Desktop:
     202.Bd -literal -offset indent
     203$ transmission-remote -a ~/Desktop/*torrent
     204.Ed
    185205
    186206Get detailed information on the torrent whose ID is '1':
    187 .Pp
    188 .Dl $ transmission-remote -t1 -i
    189 .Pp
    190 
    191 Only download the second, fourth, and sixth files of the torrent whose ID is '1':
    192 .Pp
    193 .Dl $ transmission-remote -t1 -Gall -g2,4,6
    194 .Pp
     207.Bd -literal -offset indent
     208$ transmission-remote -t1 -i"
     209.Ed
     210
     211Download only its second and fourth files:
     212.Bd -literal -offset indent
     213$ transmission-remote -t1 -Gall -g2,4"
     214.Ed
    195215
    196216Set all torrents' first two files' priorities to high:
    197 .Pp
    198 .Dl $ transmission-remote -t1 -ph1,2
    199 .Pp
     217.Bd -literal -offset indent
     218$ transmission-remote -tall -ph1,2"
     219.Ed
    200220
    201221Set all torrents' files' priorities to normal:
    202 .Pp
    203 .Dl $ transmission-remote -tall -pnall
    204 .Pp
     222.Bd -literal -offset indent
     223$ transmission-remote -tall -pnall"
     224.Ed
    205225
    206226Set download and upload limits to 100 KiB/sec and 20 KiB/sec:
    207 .Pp
    208 .Dl $ transmission-remote -d 100 -u 20
    209 .Dl $ transmission-remote -d=100 -u=20
    210 .Pp
    211 
    212 Add two torrents:
    213 .Pp
    214 .Dl $ transmission-remote -a one.torrent two.torrent
    215 .Pp
     227.Bd -literal -offset indent
     228$ transmission-remote -d100 -u20
     229$ transmission-remote --downlimit=100 --uplimit=20
     230.Bd -literal -offset indent
    216231
    217232.Sh AUTHORS
Note: See TracChangeset for help on using the changeset viewer.