56 lines
2.6 KiB
Ruby
56 lines
2.6 KiB
Ruby
class GalleryDl < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "Command-line downloader for image-hosting site galleries and collections"
|
|
homepage "https://github.com/mikf/gallery-dl"
|
|
url "https://files.pythonhosted.org/packages/f8/93/f761d13840c8b93bd79b097ab44145c0ea03faf063b94c6fda2fdf36901c/gallery_dl-1.16.5.tar.gz"
|
|
sha256 "fb8c927630b292abf5052f8f75c3eebccbdffa609566768d4dc4d9665df91e68"
|
|
license "GPL-2.0-only"
|
|
head "https://github.com/mikf/gallery-dl.git"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, arm64_big_sur: "d30ac6a9911bf26b388f4dc6d0a20412be5f4d993f3839b4d6eda1327192b6e4"
|
|
sha256 cellar: :any_skip_relocation, big_sur: "46f2173d979f6dfe69ba7338122a14348334706ef6161376dc07982252df2433"
|
|
sha256 cellar: :any_skip_relocation, catalina: "285699bb04b95bd24a73add942fd1ebeeaaac87de87a32ee0f71a0c26a3d303b"
|
|
sha256 cellar: :any_skip_relocation, mojave: "d91eac4e85cfc99832e3376cef732b57c88245acf1c085c35602729b3141652c"
|
|
end
|
|
|
|
depends_on "python@3.9"
|
|
|
|
resource "certifi" do
|
|
url "https://files.pythonhosted.org/packages/06/a9/cd1fd8ee13f73a4d4f491ee219deeeae20afefa914dfb4c130cfc9dc397a/certifi-2020.12.5.tar.gz"
|
|
sha256 "1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"
|
|
end
|
|
|
|
resource "chardet" do
|
|
url "https://files.pythonhosted.org/packages/ee/2d/9cdc2b527e127b4c9db64b86647d567985940ac3698eeabc7ffaccb4ea61/chardet-4.0.0.tar.gz"
|
|
sha256 "0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"
|
|
end
|
|
|
|
resource "idna" do
|
|
url "https://files.pythonhosted.org/packages/ea/b7/e0e3c1c467636186c39925827be42f16fee389dc404ac29e930e9136be70/idna-2.10.tar.gz"
|
|
sha256 "b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"
|
|
end
|
|
|
|
resource "requests" do
|
|
url "https://files.pythonhosted.org/packages/6b/47/c14abc08432ab22dc18b9892252efaf005ab44066de871e72a38d6af464b/requests-2.25.1.tar.gz"
|
|
sha256 "27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804"
|
|
end
|
|
|
|
resource "urllib3" do
|
|
url "https://files.pythonhosted.org/packages/d7/8d/7ee68c6b48e1ec8d41198f694ecdc15f7596356f2ff8e6b1420300cf5db3/urllib3-1.26.3.tar.gz"
|
|
sha256 "de3eedaad74a2683334e282005cd8d7f22f4d55fa690a2a1020a416cb0a47e73"
|
|
end
|
|
|
|
def install
|
|
virtualenv_install_with_resources
|
|
end
|
|
|
|
test do
|
|
system bin/"gallery-dl", "https://imgur.com/a/dyvohpF"
|
|
expected_sum = "126fa3d13c112c9c49d563b00836149bed94117edb54101a1a4d9c60ad0244be"
|
|
file_sum = Digest::SHA256.hexdigest File.read(testpath/"gallery-dl/imgur/dyvohpF/imgur_dyvohpF_001_ZTZ6Xy1.png")
|
|
assert_equal expected_sum, file_sum
|
|
end
|
|
end
|