-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathusage.txt
447 lines (345 loc) · 10.2 KB
/
usage.txt
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
USAGE NOTES
static site checker
https://ssc.lu/
(c) 2020-2025 Dylan Harris
Running SSC
===========
To run SSC, bring up the command line, change to ssc's installation
directory, and type:
Windows: ssc
Unix: ./ssc
If it's installed correctly, it should respond with (c) info.
It is possible to set up configuration files, but, to start, we'll try
a simple set of command line options. If the HTML files belonging to
your website is located in the current directory, and the main index
file is called index.html, then all you need type is:
ssc .
and off it will go, reporting any issues it finds in all HTML files in
the current directory and its descendants.
reports
-------
When ssc reports issues, it reports the HTML where it spots the
problem, with the approximate line number. This may be after the actual
location of the problem. Consider, for example:
<P>Taost<A href="https://example.com/superdoopersecretrecipe.html"
title="what a wonderful page oh so wow" onclick="haltandcatchfire"
onhover="winkembarrassingly" wimper=frequently>d wombats are a
delicious</A> thing.</P>
The word ssc spots is "Taostd". It knows there's a word to check when
it gets to the end of the word, e.g. at the space that follows it. In
this case, the word is interrupted by rather a lot of HTML, which is
ignored when checking spelling. Because the intervening HTML is so
long, crossing a number of lines, and ssc reports small snippets of
HTML per issue (to avoid spouting too much verbiage), it will not show
sufficient HTML to see the entire misspelt word. That's why, usually,
you should take the snippet and corresponding line number as a hint,
not an absolute. There is an issue, it is near the reported HTML and
line number, but, in this case, is not actually there. Of course, the
report of the misspelt word mentions the word it considers misspelt.
switches
--------
SSC has a number of switches, including:
-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 a report to file
-v x Report level x issues, where x is
0 None
1 Catastrophes
2 Abhorrences
3 Errors
4 Warnings
5 Info
6 Comments
7 Debug
8... more and more debug
-I Process Server Side Includes
-g dir set the root directory (defaults to current directory)
-x xxx treat files with extension xxx as HTML/XHTML
-i file file is the index filename (default index.html)
-s dom dom is the local site’s domain name
-L arg Define a virtual directory (arg is formatted
‘virtual=physical’)
-e Check external links (each link is checked once per run,
not once per encounter)
-l Check internal links
-O Report each broken link once, not each time it's found
-r Do not check for https certificate revocation
-X Check crosslinked IDs
-M Check microformats use of class attribute
-m Check ontologies use of WhatWG microdata attributes
-S Report site statistics
-Y 1 Disable multithreading
-A Report switches noticed by ssc, and exit.
A full list of switches is given by the -h switch.
If you find yourself having switch problems, add -A to your command
line to see what switches ssc has noticed. -A kyboshes other
processing.
Unfortunately, some fruity system suppliers sometimes release a buggy
compiler. These bugs can often be avoided by using an alternative
compiler (try gcc), disabling multithreading at runtime (-Y 1), or not
upgrading your system until the fruity supplier releases a bug free
version of their noisy compiler.
Environment
-----------
SSC will process the following environment variables:
SSC_CONFIG name of configuration file if none given on the command
line
SSC_ARGS command line switches
SSC will recognise when it is running in a CGI environment by
processing QUERY_STRING and other CGI environment variables. In such
circumstances, QUERY_STRING must contain a parameter called
html.snippet, with an appropriate value.
Configuration Files
===================
SSC will accept configuration files in INI file format. Here are some
examples, mostly adapted from the tests:
A simple configuration file
---------------------------
[general]
verbose=5
output=ssc.out
class=
[site]
domain=example.edu
extension=html
index=index.html
root=~/www/htdocs
The website for example.edu 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 analyses class identifiers, so will scan CSS files for
class names.
Links and virtual directories
-----------------------------
[general]
verbose=5
output=ssc.out
[site]
domain=example.edu
extension=html
index=index.html
root=~/www/htdocs
virtual=/net=tests/virtual
[link]
check=
external=
xlink=
Beyond the previous example, SSC will also check links, including
external links and crosslinked ids.
The configuration file specifies a virtual directory. When a link
refers to the local directory /net, SSC will seek the corresponding
file(s) in tests/virtual (relative to the current directory, not the
root).
Microformats
------------
[general]
verbose=5
output=ssc.out
class=
[site]
domain=example.edu
extension=html
index=index.html
root=~/www/htdocs
[microformat]
verify=
The only new thing here is to turn on microformats analysis (class
analysis is required).
Microdata
---------
[general]
verbose=5
output=ssc.out
class=
[site]
domain=example.edu
extension=html
index=index.html
root=~/www/htdocs
Actually, SSC will report on any microdata it finds, no matter what.
Note that, if you use itemref in your pages, ssc may give false
warnings in the section referenced by the itemref. This is because ssc
does not always know that the referenced data is not intended to be
used in its own right, unless you put it under a TEMPLATE element.
You can export the microdata encountered in JSON file format by using
the export setting (not shown).
Statistics
----------
[general]
verbose=5
output=ssc.out
class=
[site]
domain=example.edu
extension=html
extension=shtml
index=index.html
root=~/www/htdocs
[ssi]
verify=
[stats]
summary=
Turn on summary statistics, which produces a grand total at the end of
a complete run (add ""page=" below summary for individual page stats).
Note that server side includes have been turned on using general.ssi,
and files with the SHTML extension will be treated as web pages.
MathML 2
--------
This configuration file could be used to test MathML 2.
[general]
verbose=5
output=m2.out
class=
[link]
check=
[site]
domain=example.edu
extension=html
index=index.html
root=~/www/htdocs
[math]
version=2
[validation]
citype=function
citype=list
citype=logical
citype=matrix
citype=set
citype=var-x
citype=vector
What's interesting here is the validation section. The MathML
documentation lists a specific set of values that can be used with the
TYPE attribute on the CI element. The examples in the specification
give this attribute many additional, and apparently illegal, values.
(This apparent inconsistency is not uncommon amongst web
specifications.) The way to avoid SSC complaining about these extra
values is to give CI TYPE additional values in the configuration file,
as noted.
Indeed, many enumerated attribute values can be extended in this way.
Use the --validation switch to get a complete list.
arts & ego
----------
This is the configuration file I used to analyse my site.
[general]
verbose=info
output=~/www/live.out
ignore=pre
rpt=
progress=
class=
classic=
no-rel=
[css]
verify=
extension=css
version=2023++
[html]
version=2023/10/01
title=80
rfc1942=
rfc2070=
ie=
safari=
[link]
no-external=
xlink=
pretend=cgi-bin
local=
[nits]
silence=use_double_quote_code
silence=use_quote_code
silence=missing_itemtype
[shadow]
copy=dedu
root=~/www/live
file=~/www/live.ndx
ignore=inc
info=
msg=arts & ego (c) 1978-2025 dylan harris
[site]
domain=dylanharris.org
extension=shtml
extension=html
extension=htm
extension=asp
index=index.shtml
root=|/Sites
[spell]
no-check=
[ssi]
verify=
[stats]
summary=
[validation]
lang=ma
fontname=Marain
fontname=droid-sans-mono
fontname=ArialMT
fontname=Arial-BoldMT
fontname=Times-Italic
fontname=Times-Roman
fontname=TimesNewRomanPSMT
fontname=TrebuchetMS
fontname=TrebuchetMS-Italic
My site has been built by hand over the decades, and is full of errors.
I wrote ssc because I was frustrated that I could find no tool to
properly check it. Unfortunately, SSC is too successful: it finds
a gadzillion errors in arts & ego. I am slowly making the repairs.
OpenBSD website
---------------
Perhaps you've grabbed a copy of the OpenBSD website from github
(https://github.com/openbsd/www.git):
[general]
verbose=info
output=~/www.out
git=
progress=
sloven=
[css]
version=2023++
device=3
[html]
version=2023/10/01
title=80
force=
[link]
check=
no-xlink=
[nits]
comment=ftp_protocol
[site]
domain=openbsd.org
root=~/github/www
index=index.html
[stats]
summary=
Potential gotchas
=================
Versions
--------
For HTML, ssc defaults to a version of the living standard that's
contemporary to the version of ssc. The same applies to other document
types. In all cases, though, if the document itself specifies a
particular version (such as HTML 3.2), then that applies.
The version indicated by the DOCTYPE can be very broad. For example,
the HTML 5 doctype specifies HTML 5 alone, but not which flavour (W3 or
living standard), nor which revision.
If you are verifying HTML, and it contains some CSS, MathML, SVG, or
other content, then ssc will attempt to guess the version of the latter
from the former (unless you tell it which to use).
All this is why that, if you want to be precise about document
verification, specify versions, either with a switch or an entry in a
configuration file. If your HTML contains MathML/SVG/etc. snippets,
then specify those versions too.
More info
=========
The ssc source root includes some text files with more information.
gen.text Command line man page
build.txt How to make your own copy of ssc
releasenotes.txt A history of features and featurettes
README.txt An introduction to ssc
LICENCE.txt Component licences
LICENSE.txt The GNU General Licence Version 3