summaryrefslogtreecommitdiff
path: root/dot-oh-my-zsh/plugins/torrent/torrent.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'dot-oh-my-zsh/plugins/torrent/torrent.plugin.zsh')
m---------dot-oh-my-zsh0
-rw-r--r--dot-oh-my-zsh/plugins/torrent/torrent.plugin.zsh17
2 files changed, 0 insertions, 17 deletions
diff --git a/dot-oh-my-zsh b/dot-oh-my-zsh
new file mode 160000
+Subproject 6fe84bf5c82da7b1f6d7c5ec3e5c447721ac8ce
diff --git a/dot-oh-my-zsh/plugins/torrent/torrent.plugin.zsh b/dot-oh-my-zsh/plugins/torrent/torrent.plugin.zsh
deleted file mode 100644
index 656e337d..00000000
--- a/dot-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