forked from OpenAssessItToolkit/openassessit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
28 lines (27 loc) · 926 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
if [ $# -ne 4 ]; then
echo 'Requires: path or alias to your Lighthouse, url, output filename, webdriver'
exit 1
fi
mkdir -p $(pwd)/tmp/$3;
$1 $2 \
--no-enable-error-reporting \
--emulated-form-factor=none \
--only-categories=accessibility \
--chrome-flags="--headless --window-size=1300,600 --no-sandbox --disable-gpu" \
--output="json" \
--output-path="$(pwd)/tmp/$3/$3.json";
python3 -m openassessit.markdown \
--input-file="$(pwd)/tmp/$3/$3.json" \
--output-file="$(pwd)/tmp/$3/$3.md" \
--user-template-path="$(pwd)/../openassessit_templates/templates/";
python3 -m openassessit.to_html \
--input-file="$(pwd)/tmp/$3/$3.md" \
--output-file="$(pwd)/tmp/$3/$3.html" \
--user-template-path="$(pwd)/../openassessit_templates/templates/";
mkdir -p $(pwd)/tmp/$3/assets;
python3 -m openassessit.capture \
--input-file="$(pwd)/tmp/$3/$3.json" \
--assets-dir="$(pwd)/tmp/$3/assets/" \
--sleep=4 \
--driver=$4;