<commit_before>require 'fileutils'

Jekyll::Hooks.register :posts, :post_write do |post|
  puts "Generating thumbnail size image for post " + post.data['title']
  FileUtils.mkdir_p "_site/images/thumb"
  FileUtils.cd("src/images/") do
    FileUtils.cp post.data['image'], "../../_site/images/thumb/"
  end
  FileUtils.cd("_site/images/thumb/") do
    system('mogrify -resize "600x600>" ' + post.data["image"])
  end
end<commit_msg>Optimize thumbnail quality<commit_after>require 'fileutils'

Jekyll::Hooks.register :posts, :post_write do |post|
  puts "Generating thumbnail size image for post " + post.data['title']
  FileUtils.mkdir_p "_site/images/thumb"
  FileUtils.cd("src/images/") do
    FileUtils.cp post.data['image'], "../../_site/images/thumb/"
  end
  FileUtils.cd("_site/images/thumb/") do
    system('mogrify -resize "600x600>" -quality 60% ' + post.data["image"])
  end
end
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.015765765765765764, 'mean_word_length': 4.355421686746988, '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': '6523298', 'n_tokens_mistral': 320, 'n_tokens_neox': 308, 'n_words': 65}