<commit_before># Instructions on how to update AdmitHub's SSL certificates
- 1. Clone down a tool for Lets Encrypt called Dehydrated: `git clone https://github.com/lukas2511/dehydrated`
	- 1.1. Clone down a plugin for Dehydrated
		- `cd dehydrated`
		- `mkdir hooks`
		- `git clone https://github.com/kappataumu/letsencrypt-cloudflare-hook hooks/cloudflare`
	- 1.2. Check which version of Python you are running (With `python --version`)
		- 1.2.1. If Python `2.X.X`
			- `pip install -r hooks/cloudflare/requirements-python-2.txt`
		- 1.2.2. If Python `3.X.X`
			- `pip install -r hooks/cloudflare/requirements.txt`
- 2. Create a copy of `config.example` named `config`
	- Change the value of `CF_KEY` (Last option in `config` file) to the value found in [Cloudflare Settings](https://www.cloudflare.com/a/account/my-account) > `Account` > `API Key` > `Global API Key`.
	- **!!Never Commit this value!!**
		- This key provides complete access to our CloudFlare account which includes DNS options
- 3.

# Tools Used
## Dehydrated
A application which interacts with the Lets Encrypt API to obtain SSL
certificates. Using instead of the standard Let's Encrypt because it
supports convient hooks which can be used to automate part of the proccess.

## Python
Python `2.X.X` or `3.X.X` is required to run Dehydrated and its hooks.

# Files
Simple documentation for non obvouius files.

## config.example
**!!Do NOT commit with non empty `CF_KEY` value!!**  
Example `config` file which provides configuration values for Dehydrated.  

Should first be copied with the name `config` before the `CF_KEY` value
is added.

## config
**!!Should NEVER be commited!!**  
Configuration file for Dehydrated. See `config.example` for more info.

## domains.txt
Configuration file which lets Dehydrated know which domains and subdomains to obtain SSL certificates for.

Each line represents a new domain. Entries are seperated by spaces.
The first entry is the root domain (Domain with no subdomains ex: admithub.com). Every entry after that is a subdomain (Including the
root domain ex: www.admithub.com admin.admithub.com).  

Another way of explaining it:
```
<root_domain> <sub_domain_1>.<root_domain> <sub_domain_2>.<root_domain><commit_msg>+Docs(Step to obtain ssl certs, more tools)<commit_after># Instructions on how to update AdmitHub's SSL certificates
- 1. Clone down a tool for Lets Encrypt called Dehydrated: `git clone https://github.com/lukas2511/dehydrated`
	- 1.1. Clone down a plugin for Dehydrated
		- `cd dehydrated`
		- `mkdir hooks`
		- `git clone https://github.com/kappataumu/letsencrypt-cloudflare-hook hooks/cloudflare`
	- 1.2. Check which version of Python you are running (With `python --version`)
		- 1.2.1. If Python `2.X.X`
			- `pip install -r hooks/cloudflare/requirements-python-2.txt`
		- 1.2.2. If Python `3.X.X`
			- `pip install -r hooks/cloudflare/requirements.txt`
- 2. Create a copy of `config.example` named `config`
	- Change the value of `CF_KEY` (Last option in `config` file) to the value found in [Cloudflare Settings](https://www.cloudflare.com/a/account/my-account) > `Account` > `API Key` > `Global API Key`.
	- **!!Never Commit this value!!**
		- This key provides complete access to our CloudFlare account which includes DNS options
- 3. Obtain the SSL certificates by running the following in the root of this repository: `./dehydrated/dehydrated -c`

# Tools Used
## Dehydrated
**[Docs](https://dehydrated.de)**  
**Installation:** Clone down repo and run `dehydrated` executable.  

A application which interacts with the Lets Encrypt API to obtain SSL
certificates. Using instead of the standard Let's Encrypt because it
supports convient hooks which can be used to automate part of the proccess.

## Heroku Toolbelt
**[Docs](https://devcenter.heroku.com/articles/heroku-cli)**  
**Instllation:** Follow instructions in documentation.  

Provides control over Heroku applications from the command line.

## Python
Python `2.X.X` or `3.X.X` is required to run Dehydrated and its hooks.

# Files
Simple documentation for non obvouius files.

## config.example
**!!Do NOT commit with non empty `CF_KEY` value!!**  
Example `config` file which provides configuration values for Dehydrated.  

Should first be copied with the name `config` before the `CF_KEY` value
is added.

## config
**!!Should NEVER be commited!!**  
Configuration file for Dehydrated. See `config.example` for more info.

## domains.txt
Configuration file which lets Dehydrated know which domains and subdomains to obtain SSL certificates for.

Each line represents a new domain. Entries are seperated by spaces.
The first entry is the root domain (Domain with no subdomains ex: admithub.com). Every entry after that is a subdomain (Including the
root domain ex: www.admithub.com admin.admithub.com).  

Another way of explaining it:
```
root.tld sub1.root.tld sub2.root.tld sub3.root.tld
{'fraction_non_alphanumeric': 0.09908069458631256, 'fraction_numerical': 0.010010214504596528, 'mean_word_length': 4.1, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 14, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, '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': '580026', 'n_tokens_mistral': 1586, 'n_tokens_neox': 1469, 'n_words': 608}