<commit_before># geekhack_image_downloader
The purpose of this script is to download all images of a specified thread  
on Geekhack. This was originally written to support Python version 3.5.0  
although it may be compatible with other versions as well. The following is  
a short description of how to get setup to use the script successfully.  

First off, install Python 3.5 if you don't already have this. This may be  
slightly different depending on the distribution of Linux and package  
manager being used.  

For Arch Linux:  
$ sudo pacman -S python3  

For Ubuntu Linux:  
$ sudo apt-get install python3  

// Following successful installation of Python 3, use the following command   
// to check the version:  

$ python3 --version  
Python 3.5.0  

// You should see the above message indicating the version of Python. In  
// this case it is Python 3.5.0.  

// From here, it is necessary to install the three following packages which  
// aren't part of the default Python installation. This can be done using  
// pip3 which is installed as part of Python 3.  

$ sudo pip3 install lxml  
$ sudo pip3 install beautifulsoup4  
$ sudo pip3 install requests  

// Versioning information is given using the pip3 freeze command.  

$ pip3 freeze  

beautifulsoup4 version 4.4.1  
requests version 2.8.1  

// Once both these packages have been successfully installed, the script  
// is ready to use. Start the script using the following incantation after  
// it has been downloaded.  

$ python3 gh_image_dl.py  

Geekhack Thread Image Downloader  

Enter URL of the LAST page of the thread to download images from.  
(ie https://geekhack.org/index.php?topic=35864.12100)  
URL: enter_url_address_here  

// Once an appropriate URL address has been entered, the script will then  
// ask for a directory path to store the images.  

Enter the absolute filepath of an directory to store thread images.  
It will be created if it does not already exist.  
(ie imgs directory on the Desktop would become '/path/to/directory/here')  
Filepath: user_supplied_filepath  
Images will be stored in '/path/to/directory/here'  

// After the directory path has been correctly entered, the script will  
// conditionally create a directory to store the images if it does not  
// already exist.  

Finding images on page 1  
Found 13 images!  
Finding images on page 2  
Found 14 images!  
Finding images on page 3  
Found 4 images!  
Finding images on page 4  
Found 4 images!  
Finding images on page 5  
Found 9 images!  
Finding images on page 6  
Found 10 images!  

// The script will then iterate through all pages of the thread and find  
// images to download. It will eliminate duplicates based on filename here.  <commit_msg>Fixed filepath example<commit_after># geekhack_image_downloader
The purpose of this script is to download all images of a specified thread  
on Geekhack. This was originally written to support Python version 3.5.0  
although it may be compatible with other versions as well. The following is  
a short description of how to get setup to use the script successfully.  

First off, install Python 3.5 if you don't already have this. This may be  
slightly different depending on the distribution of Linux and package  
manager being used.  

For Arch Linux:  
$ sudo pacman -S python3  

For Ubuntu Linux:  
$ sudo apt-get install python3  

// Following successful installation of Python 3, use the following command   
// to check the version:  

$ python3 --version  
Python 3.5.0  

// You should see the above message indicating the version of Python. In  
// this case it is Python 3.5.0.  

// From here, it is necessary to install the three following packages which  
// aren't part of the default Python installation. This can be done using  
// pip3 which is installed as part of Python 3.  

$ sudo pip3 install lxml  
$ sudo pip3 install beautifulsoup4  
$ sudo pip3 install requests  

// Versioning information is given using the pip3 freeze command.  

$ pip3 freeze  

beautifulsoup4 version 4.4.1  
requests version 2.8.1  

// Once both these packages have been successfully installed, the script  
// is ready to use. Start the script using the following incantation after  
// it has been downloaded.  

$ python3 gh_image_dl.py  

Geekhack Thread Image Downloader  

Enter URL of the LAST page of the thread to download images from.  
(ie https://geekhack.org/index.php?topic=35864.12100)  
URL: enter_url_address_here  

// Once an appropriate URL address has been entered, the script will then  
// ask for a directory path to store the images.  

Enter the absolute filepath of an directory to store thread images.  
It will be created if it does not already exist.  
(ie imgs directory on the Desktop would become '/home/username/Desktop/imgs')  
Filepath: user_supplied_filepath  
Images will be stored in '/path/to/directory/here'  

// After the directory path has been correctly entered, the script will  
// conditionally create a directory to store the images if it does not  
// already exist.  

Finding images on page 1  
Found 13 images!  
Finding images on page 2  
Found 14 images!  
Finding images on page 3  
Found 4 images!  
Finding images on page 4  
Found 4 images!  
Finding images on page 5  
Found 9 images!  
Finding images on page 6  
Found 10 images!  

// The script will then iterate through all pages of the thread and find  
// images to download. It will eliminate duplicates based on filename here.  
{'fraction_non_alphanumeric': 0.04624066994356454, 'fraction_numerical': 0.020389586746768613, 'mean_word_length': 3.2424710424710423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2903811', 'n_tokens_mistral': 1578, 'n_tokens_neox': 1468, 'n_words': 796}