<commit_before># Stash Archive Plugin

Provides a button on repository views for downloading a zip archive of your source, and a REST API with some additional features.

### Download Button

The Download button appears next to the clone URL on all repository views. By default it will download your the content at the HEAD of your default branch. Use the branch/tag selector on the Files or Commits view to select a different branch or tag to download.

### REST API

The basic form for an archive REST URL is:

```https://<stash-base-url>/rest/archive/latest/projects/<projectKey>/repos/<repoSlug>```

This will provide a file named ```<repoSlug>-<branch-name>.zip``` that contains your source at the HEAD of the repository's default branch.

You can change the output using the following query parameters:

* ```format=[zip|tar|tar.gz]``` will change the output format (default is zip)

* ```filename=<name>``` will change the name of the downloaded file

* ```at=<branch|tag|sha|ref>``` will specify the ref to download

For example, the URL:

```https://<stash-base-url>/rest/archive/latest/projects/TEST/repos/my-cool-repo?format=tar.gz&at=release-1.3.0&filename=cool-1.3.0.tar.gz```

Will yield ```cool-1.3.0.tar.gz```, containing the repository contents at the  ```release-1.3.0``` tag.
<commit_msg>Update readme.md to reflect the switch to servlets from REST.<commit_after># Stash Archive Plugin

Provides a button on repository views for downloading a zip archive of your source, and a remote API with some additional features.

### Download Button

The Download button appears next to the clone URL on all repository views. By default it will download your the content at the HEAD of your default branch. Use the branch/tag selector on the Files or Commits view to select a different branch or tag to download.

### REST API

The basic form for an archive REST URL is:

```https://<stash-base-url>/plugins/servlet/archive/projects/<projectKey>/repos/<repoSlug>```

This will provide a file named ```<repoSlug>-<branch-name>.zip``` that contains your source at the HEAD of the repository's default branch.

You can change the output using the following query parameters:

* ```format=[zip|tar|tar.gz]``` will change the output format (default is zip)

* ```filename=<name>``` will change the name of the downloaded file

* ```at=<branch|tag|sha|ref>``` will specify the ref to download

For example, the URL:

```https://<stash-base-url>/plugins/servlet/archive/projects/TEST/repos/my-cool-repo?format=tar.gz&at=release-1.3.0&filename=cool-1.3.0.tar.gz```

Will yield ```cool-1.3.0.tar.gz```, containing the repository contents at the  ```release-1.3.0``` tag.

{'fraction_non_alphanumeric': 0.11760299625468165, 'fraction_numerical': 0.008988764044943821, 'mean_word_length': 4.682978723404255, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2577214', 'n_tokens_mistral': 802, 'n_tokens_neox': 761, 'n_words': 323}