X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;ds=sidebyside;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Ftorrent%2Ftorrent.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Ftorrent%2Ftorrent.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=656e337de241d34a28b9575249fd530192dcd3a0;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/torrent/torrent.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/torrent/torrent.plugin.zsh deleted file mode 100644 index 656e337..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/torrent/torrent.plugin.zsh +++ /dev/null @@ -1,17 +0,0 @@ -# -# Algorithm borrowed from http://wiki.rtorrent.org/MagnetUri and adapted to work with zsh. -# - -function magnet_to_torrent() { - [[ "$1" =~ xt=urn:btih:([^\&/]+) ]] || return 1 - - hashh=${match[1]} - - if [[ "$1" =~ dn=([^\&/]+) ]];then - filename=${match[1]} - else - filename=$hashh - fi - - echo "d10:magnet-uri${#1}:${1}e" > "$filename.torrent" -} \ No newline at end of file