atfbooru_can_handle() { local url="${1}" echo "${url}" | grep -qi 'booru.allthefallen.moe/posts/[0-9]*' || return 1 taggery_id_filter=atfbooru_id_filter taggery_fmturl="https://booru.allthefallen.moe/posts/%s" taggery_image_url_filter=atfbooru_image_url_filter taggery_image_tags_filter=atfbooru_image_tags_filter } atfbooru_id_filter() { sed -e 's#^.*/posts/\([0-9]\+\)\($\|/.*$\)#\1#' } atfbooru_image_url_filter() { sed -e '/Size: /!d; s/^.*/&\n/g' | sed -e '/class="search-tag/!d; s/\([^?]\)<\/a>.*$/\1/; s/^.*>//; s/ /_/g' }