<commit_before>#!/bin/sh

# Resize everything to a max width of 2000 pixels

cd images/

mkdir for_shows_process/

cp for_shows_uncompressed/* for_shows_process/

find for_shows_process/ -name "*.png" -exec mogrify -format jpg {} \;

rm -rf for_shows_process/*.png

mogrify -resize '1500>' for_shows_process/*.jpg

# Optimise JPEGs
for i in for_shows_process/*.jpg; do jpegoptim "$i" -m90; done<commit_msg>Improve image optimse script, removes EXIF data now<commit_after>#!/bin/sh

# Resize everything to a max width of 2000 pixels

cd images/

mkdir for_shows_process/
cp for_shows_uncompressed/* for_shows_process/

# Lowercase ONLY
find for_shows_process/ -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

# Convert PNG to JPEG and remove PNGs
find for_shows_process/ -name "*.png" -exec mogrify -format jpg {} \;
rm -rf for_shows_process/*.png

# Resize
mogrify -resize '1500>' for_shows_process/*.jpg

# Optimise JPEGs
for i in for_shows_process/*.jpg; do jpegoptim "$i" -m90; done

# Remove EXIF
for i in for_shows_process/*.jpg; do echo "Processing $i"; exiftool -all= "$i"; done
rm -f for_shows_process/*.jpg_original
{'fraction_non_alphanumeric': 0.1290893015030946, 'fraction_numerical': 0.019451812555260833, 'mean_word_length': 4.192660550458716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7448971', 'n_tokens_mistral': 454, 'n_tokens_neox': 425, 'n_words': 125}