<commit_before>cask :v1 => 'quotefixformac' do
  version '2.5.2'
  sha256 '8d914ae553b84fe5f246ab1eb030d25792ca8d626b3bbac57acee857135e85a9'

  url "https://github.com/robertklep/quotefixformac/releases/download/v#{version}/QuoteFix-v#{version}.zip"
  homepage 'https://github.com/robertklep/quotefixformac'
  license :oss

  stage_only true

  caveats do
    <<-EOS.undent
      To enable mail plugins and link QuoteFix:

        defaults write com.apple.mail EnableBundles -bool true
        defaults write com.apple.mail BundleCompatibilityVersion -string 3

        mkdir -p ~/Library/Mail/Bundles
        cp -R #{staged_path}/QuoteFix.mailbundle ~/Library/Mail/Bundles/
        killall Mail; open -a Mail
    EOS
  end
end<commit_msg>quotefixformac.rb: turn caveats into actions<commit_after>cask :v1 => 'quotefixformac' do
  version '2.5.2'
  sha256 '8d914ae553b84fe5f246ab1eb030d25792ca8d626b3bbac57acee857135e85a9'

  url "https://github.com/robertklep/quotefixformac/releases/download/v#{version}/QuoteFix-v#{version}.zip"
  homepage 'https://github.com/robertklep/quotefixformac'
  license :oss

  artifact 'QuoteFix.mailbundle', :target => Pathname.new(File.expand_path('~')).join('/Library/Mail/Bundles/QuoteFix.mailbundle')
  
  postflight do
    system 'defaults', 'write', 'com.apple.mail', 'EnableBundles', '-bool', 'true'
    system 'defaults', 'write', 'com.apple.mail', 'BundleCompatibilityVersion', '-string', '3'
  end

  caveats 'You may need to restart Mail.app before you can use QuoteFix'
end
{'fraction_non_alphanumeric': 0.12261041529334213, 'fraction_numerical': 0.06064601186552406, 'mean_word_length': 4.289198606271777, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6475140', 'n_tokens_mistral': 609, 'n_tokens_neox': 555, 'n_words': 104}