<commit_before>class Svgbob < Formula
  desc "Convert your ascii diagram scribbles into happy little SVG"
  homepage "https://ivanceras.github.io/svgbob-editor/"
  url "https://github.com/ivanceras/svgbob/archive/0.5.5.tar.gz"
  sha256 "e17859725c7f59b21a351f31664a7fd50e04b336a7438421775c44d852589470"
  license "Apache-2.0"
  head "https://github.com/ivanceras/svgbob.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "d8e38c21372c66f2d3b9ef8f746e8268acf4b7b63713ca4794b7565e7334950e"
    sha256 cellar: :any_skip_relocation, big_sur:       "f8931e1c0456a30ac41269816db47ff1db64689824b2a931b98fd880928b8764"
    sha256 cellar: :any_skip_relocation, catalina:      "999cdba86b39015604c276a9d58511f06a24ae08f3315dc8030ae9faaedf6d95"
    sha256 cellar: :any_skip_relocation, mojave:        "20e8ea8c15aa5749cdce3cf92b5f65e9584a0e55769fa66ae00e6bb897919436"
  end

  depends_on "rust" => :build

  uses_from_macos "libiconv"

  def install
    cd "svgbob_cli" do
      system "cargo", "install", *std_cargo_args
    end
  end

  test do
    (testpath/"ascii.txt").write <<~EOS
      +------------------+
      |                  |
      |  Hello Homebrew  |
      |                  |
      +------------------+
    EOS

    system bin/"svgbob", "ascii.txt", "-o", "out.svg"<commit_msg>svgbob: fix build on Linux (#83894)<commit_after>class Svgbob < Formula
  desc "Convert your ascii diagram scribbles into happy little SVG"
  homepage "https://ivanceras.github.io/svgbob-editor/"
  url "https://github.com/ivanceras/svgbob/archive/0.5.5.tar.gz"
  sha256 "e17859725c7f59b21a351f31664a7fd50e04b336a7438421775c44d852589470"
  license "Apache-2.0"
  head "https://github.com/ivanceras/svgbob.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "d8e38c21372c66f2d3b9ef8f746e8268acf4b7b63713ca4794b7565e7334950e"
    sha256 cellar: :any_skip_relocation, big_sur:       "f8931e1c0456a30ac41269816db47ff1db64689824b2a931b98fd880928b8764"
    sha256 cellar: :any_skip_relocation, catalina:      "999cdba86b39015604c276a9d58511f06a24ae08f3315dc8030ae9faaedf6d95"
    sha256 cellar: :any_skip_relocation, mojave:        "20e8ea8c15aa5749cdce3cf92b5f65e9584a0e55769fa66ae00e6bb897919436"
  end

  depends_on "rust" => :build

  def install
    system "cargo", "install", *std_cargo_args(path: "svgbob_cli")
  end

  test do
    (testpath/"ascii.txt").write <<~EOS
      +------------------+
      |                  |
      |  Hello Homebrew  |
      |                  |
      +------------------+
    EOS

    system bin/"svgbob", "ascii.txt", "-o", "out.svg"
{'fraction_non_alphanumeric': 0.12352717597871532, 'fraction_numerical': 0.18510072215887496, 'mean_word_length': 3.3006535947712417, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '2709254', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1083, 'n_words': 151}