As that’s quite time consuming to go to the torrent site and search bt files from it, the geeks wrote a ’oneliner’ (actually 2 lines) to perform the search:
root@raspberrypi:~# cat /usr/bin/search
#!/bin/sh
lynx -dump "http://thepiratebay.se/search/$@/0/7/0"|grep magnet | sed 'y/+/ /; s/%/\\x/g' | xargs -L 1 echo -e
#transmission-remote -n "transmission:the password lor" -a "magnet:?xt=urn:btih..."
And here is the script to download the torrent with transmission x:
root@raspberrypi:~# cat /usr/bin/download
#!/bin/sh
transmission-remote -n "transmission:okay, you win" -a "$@"
That’s how it looks like for a search: