1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-24 05:02:10 +00:00
seirdy.one/scripts/bin/axe-ff

11 lines
428 B
Text
Raw Normal View History

#!/bin/sh
2023-11-24 03:06:46 +00:00
set -e -u
# Runs axe on every page of my sitemap
# first arg is output directory, after that comes urls from a sitemap. We replace the urls with equivalent local file paths.
PATH="$(dirname "$0"):$PATH"
output_dir="$1"
shift
urls="$(echo "$*" | tr ' ' '\n' | sd '^https?://[^/]*' "file://$PWD/$output_dir" | sd '/$' '/index.html' | tr '\n' ' ')"
2023-11-10 18:43:09 +00:00
pnpm --package @axe-core/cli -s dlx axe $urls -b firefox --show-errors