diff --git a/README.md b/README.md index 76d40ed..b69a80c 100644 --- a/README.md +++ b/README.md @@ -9,24 +9,40 @@ appending comment blocks before and after the <html> tags. Please note that this application does not work on arbitrary HTML files. It is a tool for compiling special purpose HTML source files to a static, signed single-source web page. -Usage: -```php pagesign.php source destination fingerprint comments``` - -_source_ : The source HTML file name. + + + + + + + + + + + + + + + + + + + + + + + +
Usage -_destination_ : The destination HTML file name. - -_fingerprint_ : The fingerprint for the signing key's public key. The (private) signing key must exist in GPG keychain. +```php pagesign.php source destination fingerprint comments``` -_comments_ : Path to text file containing the template for the information block to be inserted immediately before - the <html> start tag. The tag {keyinfo} can be used anywhere in this text file to output basic - information of the signing key. +
SourceThe source HTML file name.
DestinationThe destination HTML file name.
FingerprintThe fingerprint for the signing key's public key. The (private) signing key must exist in GPG keychain.
CommentsPath to text file containing the template for the information block to be inserted immediately beforethe <html> start tag. The tag {keyinfo} can be used anywhere in this text file to output basicinformation of the signing key.
The entire content of the resulting HTML page, including image assets, can then be verified by anoyne using GPG. -##Example +## Example -The HTML file _source.html_ points to ``my_styles.css`` in a CSS link tag, uses ``my_functions.js`` as source for +The HTML file _``source.html``_ points to ``my_styles.css`` in a CSS link tag, uses ``my_functions.js`` as source for a script tag and embeds ``my_logo.jpg`` in an image tag. All files are located locally in the same directory. ```html @@ -52,6 +68,7 @@ Assuming that ``/path/to/pagesign.php`` is where the pagesign script is located, with fingerprint ``BA7EAC9F78DAC483B0C7DE79DD32F64A341F8E25`` is already imported to your GPG keychain, the command ```shell +#!/bin/bash php /path/to/pagesign.php source.html destination.html BA7EAC9F78DAC483B0C7DE79DD32F64A341F8E25 ``` @@ -97,6 +114,7 @@ KToPQRBF/9IDI2cdAGrd On Linux/OSX, the signature may then be verified by running ```shell +#!/bin/bash gpg --verify destination.html ``` @@ -105,6 +123,7 @@ gpg --verify destination.html or, if the HTML file is published on a web server: ```shell +#!/bin/bash curl https://url.to/destination.html | gpg > /dev/null ```