<commit_before>require 'formula'

class Rtf2latex2e < Formula
  homepage 'http://rtf2latex2e.sourceforge.net/'
  url 'http://downloads.sourceforge.net/project/rtf2latex2e/rtf2latex2e-unix/2-2/rtf2latex2e-2-2-1.tar.gz'
  version '2.2.1'
  sha1 '31be29e93c7e28ae87197fd3d45dc70662f54528'

  def install
    system "make", "install", "prefix=#{prefix}", "CC=#{ENV.cc}"
  end

  def caveats; <<-EOS.undent
    Configuration files have been installed in:
        #{share}/rtf2latex2e
    EOS
  end

  test do
    (testpath/'test.rtf').write <<-'EOF'.undent
    {\rtf1\ansi
    {\b hello} world
    }
    EOF
    system "#{bin}/rtf2latex2e", "-n", "test.rtf"
    system %q[cat test.tex | grep '\textbf{hello} world']
  end
end<commit_msg>rtf2latex2e 2.2.2<commit_after>require 'formula'

class Rtf2latex2e < Formula
  homepage 'http://rtf2latex2e.sourceforge.net/'
  url 'http://downloads.sourceforge.net/project/rtf2latex2e/rtf2latex2e-unix/2-2/rtf2latex2e-2-2-2.tar.gz'
  version '2.2.2'
  sha1 'e5092341b4aa01940a5279fc7f7d8804fda60dd8'

  def install
    system "make", "install", "prefix=#{prefix}", "CC=#{ENV.cc}"
  end

  def caveats; <<-EOS.undent
    Configuration files have been installed to:
      #{share}/rtf2latex2e
    EOS
  end

  test do
    (testpath/'test.rtf').write <<-'EOF'.undent
    {\rtf1\ansi
    {\b hello} world
    }
    EOF
    system "#{bin}/rtf2latex2e", "-n", "test.rtf"
    system %q[cat test.tex | grep '\textbf{hello} world']
  end
end
{'fraction_non_alphanumeric': 0.15552523874488403, 'fraction_numerical': 0.0723055934515689, 'mean_word_length': 3.3402366863905324, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1529806', 'n_tokens_mistral': 665, 'n_tokens_neox': 619, 'n_words': 108}