Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It should be possible to script the execution #217

Open
mgifford opened this issue Oct 26, 2023 · 2 comments
Open

It should be possible to script the execution #217

mgifford opened this issue Oct 26, 2023 · 2 comments

Comments

@mgifford
Copy link

I'd love to be able to run this on a bunch of sites from the command line. Even just being able to execute it on cron, so that every Sunday night so we have a fresh report to look at every week. 

The current approach doesn't allow for an execution like this. The Desktop and CLI Interface are nice if you want to scan a web site every once in a while, but after a few weeks you really don't want to go through the steps of doing this by hand.

@brianteeman
Copy link
Contributor

you already can. for example

node cli.js -c 2 -o siturl1-a11y-scan-results.zip -u https://site1.com -d 'iPad (gen 7) landscape' -k "yourname:[email protected]"

Were you looking for something different

@brianteeman
Copy link
Contributor

I see in your closed #9 you wanted something even simpler. You could use a bash script for that


#!/bin/bash

# Define the default parameters
Device='iPad (gen 7) landscape'
Key='yourname:[email protected]'

# Function to perform the scan
scan() {
    node cli.js -c 2 -o "$1-a11y-scan-results.zip" -u "https://$1" -d "$Device" -k "$Key"
}

# Check for argument
if [ -z "$1" ]; then
    echo "Usage: $0 <site>"
    exit 1
fi

# Call the scan function with the provided argument
scan "$1"

Now, you can simply run ./scan.sh site1.com to perform the scan on site1.com with default parameters. Adjust the script according to your needs if you want to change default parameters or add more options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants