#699487 mktorrent(1) doesn't support output to stdout (both --output=-, --output=/dev/stdout)

Package:
mktorrent
Source:
mktorrent
Description:
simple command line utility to create BitTorrent metainfo files
Submitter:
Ivan Shmakov
Date:
2019-12-07 10:03:04 UTC
Severity:
wishlist
#699487#5
Date:
2013-01-31 22:12:31 UTC
From:
To:
	Another common feature that mktorrent(1) is lacking is the
	support for writing the resulting Bencode'd data to stdout.  The
	issue is three-fold:

	• ‘-’ has no special meaning for ‘--output=’, and thus using
	  ‘--output=-’ results in a file named ‘-’ being created in the
	  current working directory; (unless such file exists, that is);

	• alternatively, ‘--output=/dev/stdout’ (or similar) fails
	  because of the unconditional use of O_CREAT | O_EXCL (as I've
	  noted in another report);

	• finally, most of the diagnostics (excluding mainly actual
	  errors) is directed to stdout, although it (arguably) makes
	  sense to send them to stderr instead.

	Please thus consider the two patches MIME'd.

	(Note, however, that the resulting code may benefit from an
	additional isatty () check.)

	For debian/changelog, I'd suggest the following bit:

  * Allow output to stdout with "--output=-" (Closes: #XXX).  Note that
    all the diagnostics (including --verbose) now goes to stderr
    unconditionally.

	TIA.

PS.  Also to note is that as long as the use of mktorrent(1) from Shell
	code is considered, writing copyright information upon every
	invocation doesn't seem like a particularly clever idea, either.
	Perhaps it should be dropped altogether.  Or, there could be
	--version…