<commit_before>upload-site
===========

Deploys a static site by receiving a tar.gz archive of all its content via HTTP POST.<commit_msg>better readme<commit_after>upload-site
===========

Deploys a static site by receiving a tar.gz archive of all its content via HTTP POST.

## Configuration

Create a file `upload-site-config.pl` in the same directory as this script with
the following variables:

* **archive_filename** The filename of a temporary file used to write the
  archive data to before extracting. Example: `/tmp/upload-site.archive.tar.gz`
* **output_directory** The directory to extract the archive into.
* **secret** A secret key used for verifying the data.

## Usage

Send a POST request pointing to this script with:

* a gzipped tar archive of all the files in your static site as the request
  body,
* an HMAC-SHA1 authentication code for the archive, using the same secret key
  as in your configuration data, as the `X-Signature` header.

The script simply verifies the data using the authentication code, and if
verified, extracts it to the specified directory.
{'fraction_non_alphanumeric': 0.07834101382488479, 'fraction_numerical': 0.0009216589861751152, 'mean_word_length': 4.5126903553299496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3154475', 'n_tokens_mistral': 289, 'n_tokens_neox': 278, 'n_words': 151}