How to convert .torrent file into magnet link?

Solution 1:

Rather late, but as suggested in the comments, the following produces a magnet link, with no further fiddling necessary:

transmission-show -m yourfiles.torrent

This program is shipped as part of the transmission-cli package on Debian derivatives, and part of the larger Transmission client.

Of course the .torrent file must be created beforehand, but that can also be done with a Transmission command, and it doesn't require a tracker (anymore):

transmission-create yourfiles