improve cli-driven torrent creation. (Danez, #309 & #310

This commit is contained in:
Charles Kerr 2007-08-19 02:02:38 +00:00
parent 993b31cc97
commit c93b993001
2 changed files with 19 additions and 1 deletions

View File

@ -39,6 +39,13 @@
.Op Fl f Ar script
.Op Fl n
.Ar torrent-file
.Nm
.Op Fl v Ar level
.Fl c Ar source-file
.Fl a Ar announce-url
.Op Fl p Ar 1
.Op Fl m Ar comment
.Ar output-file
.Ek
.Sh DESCRIPTION
The
@ -48,6 +55,17 @@ scripting capabilities.
.Pp
The options are as follows:
.Bl -tag -width Ds
.lt Fl c, Fl -create-from Ar source-file
Create torrent from the specified source file.
.lt Fl a, Fl -announce Ar announce-url
Specifies the Announceurl the new torrent will use. Can only be
used in conjunction with -c or --create-from.
.lt Fl r, Fl -private
Sets the private flag for the new torrent. Can only be used in
conjunction with -c or --create-from.
.lt Fl m, Fl -comment Ar comment-text
This optional parameter adds a comment to the new torrent. Can only
be used in conjunction with -c or --create-from.
.It Fl h, Fl -help
Prints a short usage summary.
.It Fl i, Fl -info

View File

@ -157,7 +157,7 @@ int main( int argc, char ** argv )
{
int ret;
tr_metainfo_builder_t* builder = tr_metaInfoBuilderCreate( h, sourceFile );
tr_makeMetaInfo( builder, NULL, announce, comment, isPrivate );
tr_makeMetaInfo( builder, torrentPath, announce, comment, isPrivate );
while( !builder->isDone ) {
wait_msecs( 1 );
printf( "." );