ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Validate External Links/validate_external_links.command
Revision: 1139
Committed: Wed Aug 26 18:33:35 2020 UTC (5 years, 1 month ago) by iritscen
File size: 2336 byte(s)
Log Message:
ValExtLinks: The 'I Just Broke All The Diff-Gazing' Commit. Revised file structure of the project and added the MIT license. Revised all documentation. HTTP and curl codes are now wiki-formatted and hosted online. In Val itself, I made these changes: Added --timeout argument to change default URL query timeout of 10 seconds. Revised the report header to be easier to read. Less advice is printed directly in the report and more is online at the location linked to under the Legend section.

File Contents

# Content
1 #!/bin/bash
2
3 # Runs the Validate External Links script
4 # Arguments: --help, --links URL, --exceptions URL, --output DIR, --record-ok-links, --show-added-slashes,
5 # --show-https-upgrades, --show-yt-redirects, --suggest-snapshots, --skip-archive-links, --take-screenshots FILE,
6 # --timeout NUM, --start-url NUM, --end-url NUM, --upload FILE
7 # Recommended rule:
8 # |----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ---|
9
10 # Set variables for any arguments we might use below
11 VALEXTLINKS="/path/to/Validate External Links/validate_external_links.sh"
12 LINKS_LOCAL="file:///path/to/Validate External Links/Sample files/extlinks.csv"
13 LINKS_ONLINE="https://wiki.oni2.net/w/extlinks.csv"
14 EXCEPT_LOCAL="file:///path/to/Validate External Links/exceptions.txt"
15 EXCEPT_ONLINE="https://wiki.oni2.net/Validate_External_Links/Exceptions"
16 REPORT_DIR="/path/to/where/you/want/Val Reports"
17 UPLOAD_INFO="/path/to/Validate External Links/sftp_login.txt"
18 CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
19
20
21 # Run with end URL, record OK codes, and don't upload
22 #bash "$VALEXTLINKS" --links "$LINKS_ONLINE" --exceptions "$EXCEPT_ONLINE" --output "$REPORT_DIR" --record-ok-links --suggest-snapshots --end-url 70
23
24 # Run with start/end URLs, record OK codes, and don't upload
25 #bash "$VALEXTLINKS" --links "$LINKS_ONLINE" --exceptions "$EXCEPT_ONLINE" --output "$REPORT_DIR" --record-ok-links --suggest-snapshots --start-url 1920 --end-url 1930
26
27 # Run with local extlinks and exceptions, start/end URLs, record OK codes, and don't upload
28 #bash "$VALEXTLINKS" --links "$LINKS_LOCAL" --exceptions "$EXCEPT_LOCAL" --output "$REPORT_DIR" --record-ok-links --suggest-snapshots --skip-archive-links --start-url 1 --end-url 25
29
30 # Run with unfinished screenshot feature, no upload
31 #bash "$VALEXTLINKS" --links "$LINKS_ONLINE" --exceptions "$EXCEPT_ONLINE" --output "$REPORT_DIR" --record-ok-links --take-screenshots "$CHROME"
32
33 # Normal run with no upload
34 #bash "$VALEXTLINKS" --links "$LINKS_ONLINE" --exceptions "$EXCEPT_ONLINE" --output "$REPORT_DIR" --suggest-snapshots --skip-archive-links --timeout 20
35
36 # Normal run
37 bash "$VALEXTLINKS" --links "$LINKS_ONLINE" --exceptions "$EXCEPT_ONLINE" --output "$REPORT_DIR" --suggest-snapshots --skip-archive-links --timeout 20 --upload "$UPLOAD_INFO"

Properties

Name Value
svn:executable *