7 "github.com/anacrolix/tagflag"
8 "github.com/anacrolix/torrent/metainfo"
14 mi, err := metainfo.Load(os.Stdin)
16 fmt.Fprintf(os.Stderr, "error reading metainfo from stdin: %s", err)
19 info, err := mi.UnmarshalInfo()
21 fmt.Fprintf(os.Stderr, "error unmarshalling info: %s", err)
25 fmt.Fprintf(os.Stdout, "%s\n", mi.Magnet(info.Name, mi.HashInfoBytes()).String())