homebrew-core/Formula/tvnamer.rb

70 lines
3.3 KiB
Ruby

class Tvnamer < Formula
include Language::Python::Virtualenv
desc "Automatic TV episode file renamer that uses data from thetvdb.com"
homepage "https://github.com/dbr/tvnamer"
url "https://files.pythonhosted.org/packages/7e/07/688dc96a86cf212ffdb291d2f012bc4a41ee78324a2eda4c98f05f5e3062/tvnamer-3.0.4.tar.gz"
sha256 "dc2ea8188df6ac56439343630466b874c57756dd0b2538dd8e7905048f425f04"
license "Unlicense"
revision 2
head "https://github.com/dbr/tvnamer.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_monterey: "b810144406407dbf0144f108e6d7d97c5f516a6a70b2416fb44863bdc5e2a6fe"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "90a9fbd9cbed86327be513280ac0a3a257612678706eb6c06b4d87afeac0f27d"
sha256 cellar: :any_skip_relocation, monterey: "9714bf10493610885adfabdfd81e149b0e746a7dde0f829217bc01a383158bf5"
sha256 cellar: :any_skip_relocation, big_sur: "ce42fa5966eccaec699c950624d78ca9ea761420ab87506e7b3868b70f153cb2"
sha256 cellar: :any_skip_relocation, catalina: "92115fc76ed4c93dbb15d311ac5bd98a530d9e104487a7aa1641f199a125b54e"
sha256 cellar: :any_skip_relocation, x86_64_linux: "f245ac1d125a2acb208dcf8dcc322a1d000c2fa518629945f5f275a55a74d4bb"
end
depends_on "python@3.10"
resource "certifi" do
url "https://files.pythonhosted.org/packages/6c/ae/d26450834f0acc9e3d1f74508da6df1551ceab6c2ce0766a593362d6d57f/certifi-2021.10.8.tar.gz"
sha256 "78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/56/31/7bcaf657fafb3c6db8c787a865434290b726653c912085fbd371e9b92e1c/charset-normalizer-2.0.12.tar.gz"
sha256 "2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/62/08/e3fc7c8161090f742f504f40b1bccbfc544d4a4e09eb774bf40aafce5436/idna-3.3.tar.gz"
sha256 "9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/60/f3/26ff3767f099b73e0efa138a9998da67890793bfa475d8278f84a30fec77/requests-2.27.1.tar.gz"
sha256 "68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"
end
resource "requests-cache" do
url "https://files.pythonhosted.org/packages/0c/d4/bdc22aad6979ceeea2638297f213108aeb5e25c7b103fa02e4acbe43992e/requests-cache-0.5.2.tar.gz"
sha256 "813023269686045f8e01e2289cc1e7e9ae5ab22ddd1e2849a9093ab3ab7270eb"
end
resource "tvdb_api" do
url "https://files.pythonhosted.org/packages/a9/66/7f9c6737be8524815a02dd2edd3a24718fa786614573104342eae8d2d08b/tvdb_api-3.1.0.tar.gz"
sha256 "f63f6db99441bb202368d44aaabc956acc4202b18fc343a66bf724383ee1f563"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/1b/a5/4eab74853625505725cefdf168f48661b2cd04e7843ab836f3f63abf81da/urllib3-1.26.9.tar.gz"
sha256 "aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e"
end
def install
virtualenv_install_with_resources
end
test do
raw_file = testpath/"brass.eye.s01e01.avi"
expected_file = testpath/"Brass Eye - [01x01] - Animals.avi"
touch raw_file
system bin/"tvnamer", "-b", raw_file
assert_predicate expected_file, :exist?
end
end