Changeset 3973
- Timestamp:
- Nov 26, 2007, 4:22:36 PM (14 years ago)
- Location:
- trunk/cli
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/transmissioncli.1
r3926 r3973 38 38 .Op Fl u Ar upload-rate 39 39 .Op Fl f Ar script 40 .Op Fl o Ar output-dir 40 41 .Op Fl n 41 42 .Ar torrent-file … … 56 57 The options are as follows: 57 58 .Bl -tag -width Ds 58 . lt Fl c, Fl -create-from Ar source-file59 .It Fl c, Fl -create-from Ar source-file 59 60 Create torrent from the specified source file. 60 . lt Fl a, Fl -announce Ar announce-url61 Specifies the Announceurl the new torrent will use. Can only be61 .It Fl a, Fl -announce Ar announce-url 62 Specifies the announce-url the new torrent will use. Can only be 62 63 used in conjunction with -c or --create-from. 63 . lt Fl r, Fl -private64 .It Fl r, Fl -private 64 65 Sets the private flag for the new torrent. Can only be used in 65 66 conjunction with -c or --create-from. 66 . lt Fl m, Fl -comment Ar comment-text67 .It Fl m, Fl -comment Ar comment-text 67 68 This optional parameter adds a comment to the new torrent. Can only 68 69 be used in conjunction with -c or --create-from. … … 73 74 cryptographic hash, the tracker, announcement, file size and file 74 75 name. 76 .It Fl o, Fl -output-dir Ar directory 77 Uses the specified directory as destination for downloaded data. 75 78 .It Fl s, -scrape 76 79 Prints the number of seeders and leechers for the specified torrent … … 96 99 In addition to these options, sending 97 100 .Nm 98 a SIGHUP signal can askthe tracker for more peers.101 a SIGHUP signal will contact the tracker for more peers. 99 102 .El 100 103 .Sh FILES -
trunk/cli/transmissioncli.c
r3810 r3973 42 42 43 43 const char * USAGE = 44 "Usage: %s [ options] file.torrent [options]\n\n"44 "Usage: %s [-car[-m]] [-dfinpsuv] [-h] file.torrent [output-dir]\n\n" 45 45 "Options:\n" 46 46 " -c, --create-from <file> Create torrent from the specified source file.\n" … … 66 66 static int uploadLimit = 20; 67 67 static int downloadLimit = -1; 68 static char * torrentPath = NULL; 68 static char * torrentPath = NULL; 69 static char * savePath = "."; 69 70 static int natTraversal = 0; 70 71 static sig_atomic_t gotsig = 0; … … 162 163 163 164 /* Open and parse torrent file */ 164 if( !( tor = tr_torrentInit( h, torrentPath, ".", 0, &error ) ) )165 if( !( tor = tr_torrentInit( h, torrentPath, savePath, 0, &error ) ) ) 165 166 { 166 167 printf( "Failed opening torrent file `%s'\n", torrentPath ); … … 351 352 { 352 353 static struct option long_options[] = 353 { { "help", no_argument, NULL, 'h' }, 354 { "info", no_argument, NULL, 'i' }, 355 { "scrape", no_argument, NULL, 's' }, 356 { "private", no_argument, NULL, 'r' }, 357 { "verbose", required_argument, NULL, 'v' }, 358 { "port", required_argument, NULL, 'p' }, 359 { "upload", required_argument, NULL, 'u' }, 360 { "download", required_argument, NULL, 'd' }, 361 { "finish", required_argument, NULL, 'f' }, 362 { "create", required_argument, NULL, 'c' }, 363 { "comment", required_argument, NULL, 'm' }, 364 { "announce", required_argument, NULL, 'a' }, 365 { "nat-traversal", no_argument, NULL, 'n' }, 354 { { "help", no_argument, NULL, 'h' }, 355 { "info", no_argument, NULL, 'i' }, 356 { "scrape", no_argument, NULL, 's' }, 357 { "private", no_argument, NULL, 'r' }, 358 { "verbose", required_argument, NULL, 'v' }, 359 { "port", required_argument, NULL, 'p' }, 360 { "upload", required_argument, NULL, 'u' }, 361 { "download", required_argument, NULL, 'd' }, 362 { "finish", required_argument, NULL, 'f' }, 363 { "create", required_argument, NULL, 'c' }, 364 { "comment", required_argument, NULL, 'm' }, 365 { "announce", required_argument, NULL, 'a' }, 366 { "nat-traversal", no_argument, NULL, 'n' }, 367 { "output-dir", required_argument, NULL, 'o' }, 366 368 { 0, 0, 0, 0} }; 367 369 368 370 int c, optind = 0; 369 c = getopt_long( argc, argv, "hisrv:p:u:d:f:c:m:a:n ",371 c = getopt_long( argc, argv, "hisrv:p:u:d:f:c:m:a:n:o", 370 372 long_options, &optind ); 371 373 if( c < 0 ) … … 414 416 natTraversal = 1; 415 417 break; 418 case 'o': 419 savePath = optarg; 416 420 default: 417 421 return 1; … … 419 423 } 420 424 421 if( optind > argc - 1)425 if( optind >= argc ) 422 426 { 423 427 return !showHelp;
Note: See TracChangeset
for help on using the changeset viewer.