diff options
-rwxr-xr-x | sh/cgm | 2 | ||||
-rwxr-xr-x | sh/curlqb | 4 | ||||
-rwxr-xr-x | sh/rate | 2 | ||||
-rwxr-xr-x | sh/upd | 12 | ||||
-rwxr-xr-x | sh/wtr | 2 |
5 files changed, 11 insertions, 11 deletions
@@ -27,7 +27,7 @@ mkdir "$dir" for month in $(curl -L "$url" \ | awk -F'"' '/href="[0-9]{4,4}(-[[:alnum:]]+)?\.txt(\.gz)?">\[/{print $2}'); do { - curl -s -L -o "$dir/$month" "$url/$month" + curl -sS -L -o "$dir/$month" "$url/$month" echo "Fetched $month..." if [ "${month##*.}" = gz ]; then gunzip "$dir/$month" @@ -4,7 +4,7 @@ # 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'"' ' +curl -sS 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-plugins' | awk -F'"' ' /user-content-plugins-for-private-sites/ {exit} /\.py/ { url=$2 @@ -14,7 +14,7 @@ curl -s 'https://github.com/qbittorrent/search-plugins/wiki/Unofficial-search-pl if($0 !~ /❗|✖/) print url } -' | xargs curl -s -Z -L --remote-name-all --create-dirs --output-dir "$1" -- +' | xargs curl -sS -Z -L --remote-name-all --create-dirs --output-dir "$1" -- # an alternative awk command: #awk -F'"' ' @@ -4,4 +4,4 @@ # click url/ result to see more return data descriptions # last 24 hours volume weighted average price # XXMRZUSD seems same as XMR/USD, but don't know how to query XMR/USD via jq -curl -s "https://api.kraken.com/0/public/Ticker?pair=XXMRZUSD" | jq -r .result.XXMRZUSD.p.[1] +curl -sS "https://api.kraken.com/0/public/Ticker?pair=XXMRZUSD" | jq -r .result.XXMRZUSD.p.[1] @@ -258,13 +258,13 @@ monthly_misc () { fi # https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1) - curl -s -X POST '10.0.0.4:57151/api/v2/search/updatePlugins' & + curl -sS -X POST '10.0.0.4:57151/api/v2/search/updatePlugins' & for qbt_wireguard_ip in 10.0.0.3 10.0.0.4; do - curl -s https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt | awk '$0{printf("%s\\n",$0)}' | xargs -0 -I {} curl -s -d json='{"add_trackers":"{}"}' "$qbt_wireguard_ip:57151/api/v2/app/setPreferences" & + curl -sS https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt | awk '$0{printf("%s\\n",$0)}' | xargs -0 -I {} curl -sS -d json='{"add_trackers":"{}"}' "$qbt_wireguard_ip:57151/api/v2/app/setPreferences" & # another way: `jq -r '.[]|"\(.added_on)\t\(.hash)\t\(.name)"'` - curl -s "$qbt_wireguard_ip:57151/api/v2/torrents/info?category=useful" | jq -r '.[]|[.added_on,.hash,.name]|@tsv' | grep 'archlinux.*\.iso' | sort -n | head -n-1 | awk '{print $2}' | while read -r hash; do + curl -sS "$qbt_wireguard_ip:57151/api/v2/torrents/info?category=useful" | jq -r '.[]|[.added_on,.hash,.name]|@tsv' | grep 'archlinux.*\.iso' | sort -n | head -n-1 | awk '{print $2}' | while read -r hash; do # need POST to delete torrents. -d default POST, so no need `-X POST` - curl -s -d "hashes=$hash" -d deleteFiles=true "$qbt_wireguard_ip:57151/api/v2/torrents/delete" + curl -sS -d "hashes=$hash" -d deleteFiles=true "$qbt_wireguard_ip:57151/api/v2/torrents/delete" done & done wait @@ -278,14 +278,14 @@ monthly_misc () { rsync -vPu studio:~/downloads/torrents/useful/archlinux*.iso /run/media/xyz/Ventoy/archlinux-x86_64.iso # only check checksum and gpg signature on insp is sufficient for me, else too much work - if curl -s -o /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig https://mirror.fcix.net/archlinux/iso/latest/archlinux-x86_64.iso.sig; then + if curl -sS -o /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig https://mirror.fcix.net/archlinux/iso/latest/archlinux-x86_64.iso.sig; then gpg --verify /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig || die 'Arch iso gpg signature check failed' else die 'Arch iso gpg signature download failed' fi # need to cd to iso file dir to checksum cd /run/media/xyz/Ventoy || exit - curl -s https://mirror.fcix.net/archlinux/iso/latest/sha256sums.txt | grep archlinux-x86_64\.iso | tee /run/media/xyz/Ventoy/archlinux-x86_64.iso.sha256 | sha256sum -c || die 'Arch iso checksum does not match' + curl -sS https://mirror.fcix.net/archlinux/iso/latest/sha256sums.txt | grep archlinux-x86_64\.iso | tee /run/media/xyz/Ventoy/archlinux-x86_64.iso.sha256 | sha256sum -c || die 'Arch iso checksum does not match' # if stay at /run/media/xyz/Ventoy, will cause it be busy and can't be umount, which will cause `ventoy -u` fail # need to be after `wait`, because checksum need to be at ventoy dir cd || exit @@ -1,7 +1,7 @@ #!/bin/sh # https://github.com/open-meteo/open-meteo -curl -s -G -d "latitude=${1:-37.34}" -d "longitude=${2:--121.89}" -d 'daily=weathercode,temperature_2m_max,temperature_2m_min' -d 'timezone=auto' 'https://api.open-meteo.com/v1/forecast' | jq -r '[.daily|.time, .weathercode, .temperature_2m_max, .temperature_2m_min]|transpose|.[]|@tsv' | while read -r time code max min; do +curl -sS -G -d "latitude=${1:-37.34}" -d "longitude=${2:--121.89}" -d 'daily=weathercode,temperature_2m_max,temperature_2m_min' -d 'timezone=auto' 'https://api.open-meteo.com/v1/forecast' | jq -r '[.daily|.time, .weathercode, .temperature_2m_max, .temperature_2m_min]|transpose|.[]|@tsv' | while read -r time code max min; do # https://open-meteo.com/en/docs case "$code" in 0) code='clear sky';; |