homebrew-core/Formula/yle-dl.rb

92 lines
4.4 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/cf/d1/cb32cee1dd0d808f7a9a28c04dc9c93f586cce1b8efd8e27adaf7e80e899/yle-dl-20221231.tar.gz"
sha256 "2687f3ae2b0fd062229c32c0bf7d54fe4532fe19fe8113cec7c6bf445809ce61"
license "GPL-3.0-or-later"
head "https://github.com/aajanki/yle-dl.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "a915609561d83e2b04c9a9bc77b8262033d26b5fc5306cb53ce4c87d1e997ad2"
sha256 cellar: :any_skip_relocation, arm64_monterey: "3238f0a712c2b2190b0d0f3c572bf5a0b5003e936bfedbc9604951c61a937883"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "529e6492483d8c6234f46f6903d019cd22b4eba515003a86a39f280a3c67d9e6"
sha256 cellar: :any_skip_relocation, ventura: "8958cb2f415651ab5b090999277c84a9478299684cea259a12dd02a7acc3b2a1"
sha256 cellar: :any_skip_relocation, monterey: "5b2b54b91a9095054a9298fea293f735043b0d1e16f17785a7a8efb88036ae77"
sha256 cellar: :any_skip_relocation, big_sur: "bfb289c85b8e7b8d03f7fec0b8681c642d8764359057f99d7c25cb18aac923fe"
sha256 cellar: :any_skip_relocation, x86_64_linux: "57065dd17ba06f5e2119e273186565bf91b00a748b98d1e3b19856d86190b70d"
end
depends_on "ffmpeg"
depends_on "python@3.11"
depends_on "rtmpdump"
uses_from_macos "libxslt"
resource "attrs" do
url "https://files.pythonhosted.org/packages/21/31/3f468da74c7de4fcf9b25591e682856389b3400b4b62f201e65f15ea3e07/attrs-22.2.0.tar.gz"
sha256 "c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"
end
resource "certifi" do
url "https://files.pythonhosted.org/packages/37/f7/2b1b0ec44fdc30a3d31dfebe52226be9ddc40cd6c0f34ffc8923ba423b69/certifi-2022.12.7.tar.gz"
sha256 "35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"
end
resource "cffi" do
url "https://files.pythonhosted.org/packages/2b/a8/050ab4f0c3d4c1b8aaa805f70e26e84d0e27004907c5b8ecc1d31815f92a/cffi-1.15.1.tar.gz"
sha256 "d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/a1/34/44964211e5410b051e4b8d2869c470ae8a68ae274953b1c7de6d98bbcf94/charset-normalizer-2.1.1.tar.gz"
sha256 "5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"
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/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438/idna-3.4.tar.gz"
sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"
end
resource "lxml" do
url "https://files.pythonhosted.org/packages/06/5a/e11cad7b79f2cf3dd2ff8f81fa8ca667e7591d3d8451768589996b65dec1/lxml-4.9.2.tar.gz"
sha256 "2455cfaeb7ac70338b3257f41e21f0724f4b5b0c0e7702da67ee6c3640835b67"
end
resource "pycparser" do
url "https://files.pythonhosted.org/packages/5e/0b/95d387f5f4433cb0f53ff7ad859bd2c6051051cebbb564f139a999ab46de/pycparser-2.21.tar.gz"
sha256 "e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"
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/c2/51/32da03cf19d17d46cce5c731967bf58de9bd71db3a379932f53b094deda4/urllib3-1.26.13.tar.gz"
sha256 "c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"
end
resource "xattr" do
url "https://files.pythonhosted.org/packages/a0/19/dfb42dd6e6749c6e6dde55b12ee44b3c8247c3cfa5b85180a60902722538/xattr-0.10.1.tar.gz"
sha256 "c12e7d81ffaa0605b3ac8c22c2994a8e18a9cf1c59287a1b7722a2289c952ec5"
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