Current information can be found here.
To run ssc, install curl (if necessary), bring up the command line, change to the install directory, and then try:
- Windows: ssc
- Unix: ./ssc
If it is installed correctly, it should respond with (c) info and a simple usage message.
It is possible to set up configuration files, but to start with lets try a simple set of command line options. It the HTML files belonging to your website is located in DIR, and the main index file is called index.html, then all you need type is:
and off it will go, reporting on any issues it finds in all HTML files in DIR and its descendants.
SSC has a number of switches:
-h Output simple help -V Output the version of SSC -f file Load a runtime configuration from file -F Load a runtime configuration from ~/.ssc/config -o file Output report to file -v x Report level x issues, where x is 0 None 1 Catastrophes 2 Errors 3 Warnings 4 Info 5 Comments 6 Debug 7... more and more debug -I Process (simple) Server Side Includes -g dir set website root directory (defaults to current directory) -x xxx treat files with extension xxx as HTML/XHTML (may be repeated) -i file file is index file in directories (default index.html) -s dom dom is the local site’s domain name (may be repeated) -L arg Define virtual directory (arg is formatted ‘virtual=physical’) (may be repeated) -e Check external links (each link is checked once per run, not once per encounter) -3 Report HTTP 301 and 308 as errors (e.g. forwarding) -l Check internal links -O Report each broken link only once, not each time it occurs -r Do not check whether https certificates have been revoked -X Check crosslinked IDs (e.g. id attribute) -M Check microformats.org set using class attribute -m Check schema.org data set using WhatWG microdata attributes -S Report site statistics
SSC will accept configuration files, making it easy to set up checks that you wish to run from time to time. They’re in INI format. I’ll going to illustrate more features of the product using example configuration files, mostly adapted from the tests.
A simple configuration file
[general] verbose=4 output=ssc.out class=yes [site] domain=example.edu extension=html index=index.html root=~/www/htdocs
The website is for example.edu, which can be found in ~/www.htdocs. Standard index files are called index.html, and html files always have the html extension.
The configuration outputs errors, warnings and info messages to ssc.out. It also requires analysis of class identifiers, which means SSC will scan any CSS files it encounters for class names.
Links and virtual directories
[general] verbose=4 output=ssc.out [site] domain=example.edu extension=html index=index.html root=~/www.htdocs virtual=/net=tests/virtual [link] check=yes external=yes xlink=yes
Beyond the previous example, check links, external links, and crosslinked ids.
The configuration file specifies a virtual directory. When a link refers to the directory /net, search for the corresponding files in tests/virtual (relative to the current directory, not the root).
[general] verbose=4 output=ssc.out class=yes [site] domain=example.edu extension=html index=index.html root=~/www.htdocs [microformat] verify=yes
The only new thing here is to turn on microformats analysis (class analysis is necessary too).
Note that schema.org microdata analysis is always active; the appropriate attributes cannot be used for other things.
[general] ssi=yes verbose=4 output=ssc.out class=yes [site] domain=example.edu extension=html extension=shtml index=index.html root=~/www/htdocs [stats] summary=yes
Turn on summary statistics, which produces a grand total at the end of a complete run (add page=yes below summary for individual page stats).
Also note that server side includes have been turned on using general.ssi, and files with the SHTML extension will be treated as web pages.
arts & ego
This is the configuration file I use to analyse this site.
[general] verbose=4 class=yes output=ssc.out ssi=yes [site] domain=dylanharris.org extension=shtml extension=html extension=htm extension=asp index=index.shtml root=X:\Site [link] check=yes xlink=yes [microformat] verify=yes [stats] summary=yes