homebrew-core/Formula/yle-dl.rb

77 lines
3.5 KiB
Ruby

class YleDl < Formula
include Language::Python::Virtualenv
desc "Download Yle videos from the command-line"
homepage "https://aajanki.github.io/yle-dl/index-en.html"
url "https://files.pythonhosted.org/packages/6a/2e/30c4ef58bca8bab95860363b08b570eb0c56b441beb4e149282241379e09/yle-dl-20220704.tar.gz"
sha256 "b81af57852aa0004c9a0ffdc82e27189bcecee1ffaeb1ca90b6d3822c8a328e0"
license "GPL-3.0-or-later"
revision 1
head "https://github.com/aajanki/yle-dl.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_monterey: "2e4b774814730dbc5968543dccaf0b22aed68c3125bf15d46f48d6b76daf767b"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "22c31ffabe9f84ab07e2a513f4a5179b40052afa374f4b4c83e77bdde36f7374"
sha256 cellar: :any_skip_relocation, monterey: "d2e536dfe7b68a3091f7994b0f1836c04a5bf55483913cbc306c55daacbc9c3b"
sha256 cellar: :any_skip_relocation, big_sur: "c430b1675864c9a1660d2208b3353e871ca9f23e01bbadf5f7622a5bbfd75c68"
sha256 cellar: :any_skip_relocation, catalina: "f6e672a26e1d5fa6a6dbf64a27adef413cff52451dca99d374af2fb592a1816f"
sha256 cellar: :any_skip_relocation, x86_64_linux: "ad5ea9907ced547337ccc3cde4c05d03b7413d0c159b06ff6b9306c8a3f090a1"
end
depends_on "ffmpeg"
depends_on "python@3.10"
depends_on "rtmpdump"
uses_from_macos "libxslt"
resource "attrs" do
url "https://files.pythonhosted.org/packages/d7/77/ebb15fc26d0f815839ecd897b919ed6d85c050feeb83e100e020df9153d2/attrs-21.4.0.tar.gz"
sha256 "626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"
end
resource "certifi" do
url "https://files.pythonhosted.org/packages/cc/85/319a8a684e8ac6d87a1193090e06b6bbb302717496380e225ee10487c888/certifi-2022.6.15.tar.gz"
sha256 "84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/93/1d/d9392056df6670ae2a29fcb04cfa5cee9f6fbde7311a1bb511d4115e9b7a/charset-normalizer-2.1.0.tar.gz"
sha256 "575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"
end
resource "ConfigArgParse" do
url "https://files.pythonhosted.org/packages/16/05/385451bc8d20a3aa1d8934b32bd65847c100849ebba397dbf6c74566b237/ConfigArgParse-1.5.3.tar.gz"
sha256 "1b0b3cbf664ab59dada57123c81eff3d9737e0d11d8cf79e3d6eb10823f1739f"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/62/08/e3fc7c8161090f742f504f40b1bccbfc544d4a4e09eb774bf40aafce5436/idna-3.3.tar.gz"
sha256 "9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
end
resource "lxml" do
url "https://files.pythonhosted.org/packages/70/bb/7a2c7b4f8f434aa1ee801704bf08f1e53d7b5feba3d5313ab17003477808/lxml-4.9.1.tar.gz"
sha256 "fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/a5/61/a867851fd5ab77277495a8709ddda0861b28163c4613b011bc00228cc724/requests-2.28.1.tar.gz"
sha256 "7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"
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
output = shell_output("#{bin}/yle-dl --showtitle https://areena.yle.fi/1-1570236")
assert_match "Traileri:", output
assert_match "2012-05-30T10:51", output
end
end