TerminalImageViewer/tiv.rb
Aaron Liu 9004bb3f47
Update tiv.rb
Bumped version, added `license`, `branch`, better `install`, and better `test`.
2022-01-31 16:23:39 +08:00

23 lines
739 B
Ruby
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class Tiv < Formula
desc "Display images in a terminal using block graphic characters"
homepage "https://github.com/stefanhaustein/TerminalImageViewer"
url "https://github.com/stefanhaustein/TerminalImageViewer/archive/refs/tags/v1.1.1.tar.gz"
sha256 "9a5f5c8688ef8db0e88dfcea6a1ae30da32268a7ab7972ff0de71955a75af0db"
license "Apache-2.0"
head "https://github.com/stefanhaustein/TerminalImageViewer.git", branch: "master"
depends_on "imagemagick"
uses_from_macos "curl" => :test
def install
cd "src/main/cpp" do
system "make"
bin.install "tiv"
end
end
test do
assert_equal "\e[48;2;0;0;255m\e[38;2;0;0;255m  \e[0m",
shell_output("#{bin}/tiv #{test_fixtures("test.png")}").strip
end
end