How to create magnet link from torrent file

  1. Create new torrent file:

    buildtorrent -a dht:// /path/to/bunch_of_files out.torrent
    
  2. Add torrent file to your torrent client, tell it where your files could be found.

  3. Run mkmagnet on torrent file:

    mkmagnet out.torrent
    
  4. Post magnet link elsewhere.


Note: mkmagnet requires official bittorrent package installed (apt-get install bittorrent on debian/ubuntu).