diff options
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/curlqb | 25 | ||||
-rwxr-xr-x | .local/bin/upd | 10 |
2 files changed, 34 insertions, 1 deletions
diff --git a/.local/bin/curlqb b/.local/bin/curlqb new file mode 100755 index 00000000..67dc2f82 --- /dev/null +++ b/.local/bin/curlqb @@ -0,0 +1,25 @@ +#!/bin/sh + +# how to not rewrite, maybe not? +# how to know if there's new? use rewrite? +# how to check if some script outdated? delete it? +# how qbittorrent auto update those scripts, maybe try the fork? +# how to make it a pure awk script? should I? +# can I replace awk $0 ~ /.../ with /.../ ? + +curl -s 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-plugins' | awk -F'"' '/Plugins for Private sites/{exit} /\.py/{url=$2;getline;getline;getline;if($0 !~ /❗|✖/)print url}' | xargs curl -s -Z -L --remote-name-all --create-dirs --output-dir "$1" -- + +#curl -s 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-plugins' | awk -F'"' '{ +# if($0 ~ /Plugins for Private sites/) +# exit +# if($0 ~ /\.py/) +# { +# url=$2 +# getline +# getline +# getline +# if($0 !~ /❗|✖/) +# print url +# } +#}' | xargs curl -s -Z -L --remote-name-all --create-dirs --output-dir "$1" -- + diff --git a/.local/bin/upd b/.local/bin/upd index a39eea90..e6f2d31a 100755 --- a/.local/bin/upd +++ b/.local/bin/upd @@ -32,20 +32,28 @@ pac () sudo pacman -Fy } +qb () +{ + rm -r -- "$HOME/programs/qbittorrent_search_plugins/" + curlqb "$HOME/programs/qbittorrent_search_plugins/" +} + if [ $# -eq 0 ]; then pac + qb ncm kg refl gall else - while getopts rgknp opt; do + while getopts rgknpq opt; do case $opt in r)refl;; g)gall;; k)kg;; n)ncm;; p)pac;; + q)qb;; \?)exit 1;; esac done |