mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-24 17:52:11 +00:00
2b016aa973
- Avoid relative paths, so I can run them from any working directory. - Make a dedicated curl-wrapping shell script instead of re-defining the same alias everywhere. - Support extended offline periods: allow get-webmentions.sh to fall back to the cached copy of my webmentions for up to a day, and don't accidentally destroy it; keep changes atomic. - Verify that the fetched webmentions are legit before replacing the cached ones. - Make shellcheck happy about quoting in vnu.sh by passing the list of files with xargs instead of a shell variable.
8 lines
417 B
Bash
Executable file
8 lines
417 B
Bash
Executable file
#!/bin/sh
|
|
# 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' ' ')"
|
|
pnpm --package @axe-core/cli -s dlx axe $urls -b firefox --show-errors
|