<commit_before>require 'formula'

class TidypManual < Formula
  url "https://github.com/petdance/tidyp/raw/6a6c85bc9cb089e343337377f76127d01dd39a1c/htmldoc/tidyp1.xsl"
  md5 "5f90f914e69bdff1663a6772c6d9ca3d"
end

class Tidyp < Formula
  url 'http://github.com/downloads/petdance/tidyp/tidyp-1.04.tar.gz'
  homepage 'http://tidyp.com/'
  md5 '00a6b804f6625221391d010ca37178e1'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"

    # Use the newly brewed Tidyp to generate the manual
    TidypManual.new.brew do
      system "#{bin}/tidyp -xml-help > tidyp1.xml"
      system "#{bin}/tidyp -xml-config > tidyp-config.xml"
      system "/usr/bin/xsltproc tidyp1.xsl tidyp1.xml |/usr/bin/gzip >tidyp.1.gz"
      man1.install 'tidyp.1.gz'
    end
  end
end<commit_msg>tidyp: use https for GitHub download<commit_after>require 'formula'

class TidypManual < Formula
  url "https://github.com/petdance/tidyp/raw/6a6c85bc9cb089e343337377f76127d01dd39a1c/htmldoc/tidyp1.xsl"
  md5 "5f90f914e69bdff1663a6772c6d9ca3d"
end

class Tidyp < Formula
  url 'https://github.com/downloads/petdance/tidyp/tidyp-1.04.tar.gz'
  homepage 'http://tidyp.com/'
  md5 '00a6b804f6625221391d010ca37178e1'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"

    # Use the newly brewed Tidyp to generate the manual
    TidypManual.new.brew do
      system "#{bin}/tidyp -xml-help > tidyp1.xml"
      system "#{bin}/tidyp -xml-config > tidyp-config.xml"
      system "/usr/bin/xsltproc tidyp1.xsl tidyp1.xml |/usr/bin/gzip >tidyp.1.gz"
      man1.install 'tidyp.1.gz'
    end
  end
end
{'fraction_non_alphanumeric': 0.13045912653975364, 'fraction_numerical': 0.0929451287793953, 'mean_word_length': 3.175233644859813, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '627475', 'n_tokens_mistral': 787, 'n_tokens_neox': 699, 'n_words': 122}