README.md in awesome_bot-1.11.0 vs README.md in awesome_bot-1.12.0

- old
+ new

@@ -20,25 +20,27 @@ ``` Usage: awesome_bot [file or files] awesome_bot [options] -f, --files [files] Comma separated files to check + -a, --allow [errors] Status code errors to allow --allow-dupe Duplicate URLs are allowed --allow-ssl SSL errors are allowed --allow-redirect Redirected URLs are allowed --allow-timeout URLs that time out are allowed -t, --set-timeout [seconds] Set connection timeout -w, --white-list [urls] Comma separated URLs to white list ``` - You can check multiple files (comma separated or `*` pattern, look below for details). -- By default, `awesome_bot` flags duplicates and URL redirects. +- By default, duplicate URLs or any status code other than `200` are flagged as failures. - Use option `--allow-dupe` to allow duplicates. - - Use option `--allow-redirect` to all redirects. - - You can white list links so that they won't be flagged. `-w domain1.com/post/article,domain2.com` white lists `domain1.com/post/article` and all links matching `domain2.com`. + - Use option `--allow-redirect` to allow redirects. + - Use option `--allow` to allow specific status code errors. + - Use option `--white-list` (`-w` for short) to prevent links from being flagged: `-w domain1.com/post/article,domain2.com` white lists `domain1.com/post/article` and all links matching `domain2.com`. ### Examples ```shell $ awesome_bot README.md @@ -61,21 +63,25 @@ 2. [L05] http://i.giphy.com/urvsFBDfR6N32.gif # ... ``` ```shell -$ awesome_bot README.md --allow-dupe --allow-redirect --w rubydoc,giphy +$ awesome_bot README.md --allow-dupe --allow-redirect -w rubydoc,giphy # allow redirects, dupes and white list all links matching rubydoc and giphy $ awesome_bot README.md,README-zh.md # check links in 2 files $ awesome_bot docs/*.md # check all markdown files in docs/ directory -$ awesome_bot README.md --allow-timeout --t 5 +$ awesome_bot README.md --allow-timeout -t 5 # speed up validation by setting a timeout of 5s per link request and allowing timeouts + +$ awesome_bot README.md --allow 403,429 +# allow status code errors 403 and 429 +# --allow 301 would be similar to --allow-redirect ``` ```shell (master) $ git branch * master @@ -88,10 +94,10 @@ 1 file changed, 1 insertion(+) create mode 100644 new-readme.md (new-branch) $ git diff master.. --name-only | grep '.md' | xargs awesome_bot > Checking links in new-readme.md Links to check: 1 - 1. https://github.com/dkhamsing + 1. https://github.com/dkhamsing Checking URLs: ✓ No issues :-) Wrote results to ab-results-new-readme.md.json ```