<commit_before>require "formula"

class TmuxClipboard < Formula
  homepage "https://gist.github.com/4020666"
  version "1.0"
  url "git://gist.github.com/4020666.git"

  def install
    bin.install("tmux_clipboard")
  end

  def caveats
    <<-CAVEATS
# Start/stop tmux_clipboard

If this is your first install, automatically load on login with:
  mkdir -p ~/Library/LaunchAgents
  cp #{plist_path} ~/Library/LaunchAgents/
  launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename}

If this is an upgrade and you already have the #{plist_path.basename} loaded:
  launchctl unload -w ~/Library/LaunchAgents/#{plist_path.basename}
  cp #{plist_path} ~/Library/LaunchAgents/
  launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename}
    CAVEATS
  end

  def startup_plist
    user = `whoami`.chomp

    <<-PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>#{plist_name}</string>
  <key>ProgramArguments</key>
  <array>
    <string>#{bin}/tmux_clipboard</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>UserName</key>
  <string>#{user}</string>
  <key>WorkingDirectory</key>
  <string>#{HOMEBREW_PREFIX}</string>
  <key>StandardOutPath</key>
  <string>#{var}/tmux_clipboard.log</string>
  <key>StandardErrorPath</key>
  <string>#{var}/tmux_clipboard.log</string>
</dict>
</plist>
    PLIST
  end
end<commit_msg>Puts log in #{var}/log<commit_after>require "formula"

class TmuxClipboard < Formula
  homepage "https://gist.github.com/4020666"
  version "1.0"
  url "git://gist.github.com/4020666.git"

  def install
    bin.install("tmux_clipboard")
  end

  def caveats
    <<-CAVEATS
# Start/stop tmux_clipboard

If this is your first install, automatically load on login with:
  mkdir -p ~/Library/LaunchAgents
  cp #{plist_path} ~/Library/LaunchAgents/
  launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename}

If this is an upgrade and you already have the #{plist_path.basename} loaded:
  launchctl unload -w ~/Library/LaunchAgents/#{plist_path.basename}
  cp #{plist_path} ~/Library/LaunchAgents/
  launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename}
    CAVEATS
  end

  def startup_plist
    user = `whoami`.chomp

    <<-PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>#{plist_name}</string>
  <key>ProgramArguments</key>
  <array>
    <string>#{bin}/tmux_clipboard</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>UserName</key>
  <string>#{user}</string>
  <key>WorkingDirectory</key>
  <string>#{HOMEBREW_PREFIX}</string>
  <key>StandardOutPath</key>
  <string>#{var}/log/tmux_clipboard.log</string>
  <key>StandardErrorPath</key>
  <string>#{var}/log/tmux_clipboard.log</string>
</dict>
</plist>
    PLIST
  end
end
{'fraction_non_alphanumeric': 0.16530545573342045, 'fraction_numerical': 0.01633453119895459, 'mean_word_length': 4.146218487394958, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 2, '>': 79, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '4847697', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1151, 'n_words': 216}