diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-07-07 22:08:14 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-07-07 22:08:14 -0700 |
commit | 6e73cdd6f1c50439ce10c99c85a4148c8a58d6b3 (patch) | |
tree | 8a0affcb51c3a57779937e118f8bcd75824a42d1 /home/xyz | |
parent | 6bbde285e3635a77d344b0decc7a1fb5aea9c5ab (diff) |
configs curlqb and jackett
Diffstat (limited to 'home/xyz')
-rwxr-xr-x | home/xyz/.local/bin/curlqb | 27 | ||||
-rwxr-xr-x | home/xyz/.local/bin/upd | 11 | ||||
-rw-r--r-- | home/xyz/.local/share/qBittorrent/nova3/engines/jackett.json | 5 |
3 files changed, 41 insertions, 2 deletions
diff --git a/home/xyz/.local/bin/curlqb b/home/xyz/.local/bin/curlqb new file mode 100755 index 00000000..d2851cd9 --- /dev/null +++ b/home/xyz/.local/bin/curlqb @@ -0,0 +1,27 @@ +#!/bin/sh + +# need --no-clobber if don't want overwrite when same name +# if do this also need change .py.1 to .py else qbt will not accept +# also if a.py and a_1.py, qbt will not accept the latter, maybe need to change some .py codes inside +# now, I choose to let three files to be overwrited, those are "with categories" .py files that overwrite without categories .py files, which is what I want so I don't use --no-clobber +curl -s 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-plugins' | awk -F'"' ' +/user-content-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" -- + +# an alternative awk command: +#awk -F'"' ' +#/require an account/ {exit} +#/\.py/ { +# url=$2 +# line=NR +#} +#url && NR==line+3 && !/❗|✖/ {print url} +#' diff --git a/home/xyz/.local/bin/upd b/home/xyz/.local/bin/upd index 96a5a912..48ae6629 100755 --- a/home/xyz/.local/bin/upd +++ b/home/xyz/.local/bin/upd @@ -3,7 +3,8 @@ all () { fast clean - refl + qb + #refl } clean () { @@ -42,6 +43,11 @@ checkrebuild: $(checkrebuild | awk '$2!~"zoom|miniconda3"{printf("%s ",$2)}') " } +qb () { + rm -r -- "$HOME/programs/qbittorrent_search_plugins/" + curlqb "$HOME/programs/qbittorrent_search_plugins/" +} + refl () { # why not use http: # https://www.reddit.com/r/archlinux/comments/kx149z/should_i_use_http_mirrors/ @@ -55,13 +61,14 @@ refl () { if [ $# -eq 0 ]; then fast else - while getopts acfmpr opt; do + while getopts acfmpqr opt; do case $opt in a)all;; c)clean;; f)fast;; m)misc;; p)pac;; + q)qb;; r)refl;; \?)exit 1;; esac diff --git a/home/xyz/.local/share/qBittorrent/nova3/engines/jackett.json b/home/xyz/.local/share/qBittorrent/nova3/engines/jackett.json new file mode 100644 index 00000000..0a2de6a3 --- /dev/null +++ b/home/xyz/.local/share/qBittorrent/nova3/engines/jackett.json @@ -0,0 +1,5 @@ +{ + "api_key": "4x6sluxw8stanix72se1ez0i8jwsk00d", + "tracker_first": false, + "url": "http://127.0.0.1:9117" +} |