Command line
One Python file, nothing to install.
On the Agency plan
Get the file
clearreadout.pyPython 3.9 or later, nothing else to install.
DownloadUse it
Paste your key in place of YOUR_API_KEY and your site in place of YOUR_SITE. sites prints each site's report_id: put one in place of REPORT_ID.
Terminal
export CLEARREADOUT_KEY=YOUR_API_KEY
python3 clearreadout.py me
python3 clearreadout.py sites
python3 clearreadout.py check YOUR_SITE
python3 clearreadout.py report REPORT_ID
python3 clearreadout.py fixes REPORT_IDThe commands
| Command | What it does |
|---|---|
me | Your plan and the checks left today. |
sites | Your sites with their ratings and each newest report_id. |
check YOUR_SITE | Starts a check, waits, then prints how it ended, with its report_id. |
report REPORT_ID | The rating and the counts for one report. |
fixes REPORT_ID | Every problem and how to fix it, as plain text. |
How it ends
check asks every five seconds until the check is done. Its exit code tells a script how it went:
- 0The check finished and its report is ready.
- 1The check failed, or we turned the request down. The reason is printed.
Use it in a build
Download the file once and commit it to your repository, so every build runs the copy you checked. Keep the key in your build's secret settings as CLEARREADOUT_KEY, not in the file. This step checks the site, then saves its fixes. A check that fails stops the build and prints why.
Build step
set -e
python3 clearreadout.py check YOUR_SITE > check.json
id=$(python3 -c "import json; print(json.load(open('check.json'))['report_id'])")
python3 clearreadout.py fixes "$id" > fixes.txt