25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
320 B

#!/usr/bin/env bash
set -e
while getopts ":t:d:" opt; do
case "$opt" in
t) TYPE="$OPTARG" ;;
d) DATE="$OPTARG" ;;
esac
done
shift "$((OPTIND-1))"
: ${TYPE:=fractals}
: ${DATE:="$(date "+%Y%m%d")"}
URL="https://imirhil.fr/gw2/$TYPE"
curl -s "$URL/" | sed -n "s#.*href=\"\(.*\)\">.*#$URL/\1#p" | rg "$DATE"