Skip to content

Commit 018315f

Browse files
authored
Merge pull request Homebrew#227151 from marcfrederick/formula/moodle-dl
moodle-dl 2.3.13 (new formula)
2 parents 614ecf2 + f80c9eb commit 018315f

File tree

3 files changed

+171
-0
lines changed

3 files changed

+171
-0
lines changed

.github/autobump.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,6 +2459,7 @@ monika
24592459
monit
24602460
monitoring-plugins
24612461
monolith
2462+
moodle-dl
24622463
moon
24632464
morpheus
24642465
morse

Formula/m/moodle-dl.rb

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
class MoodleDl < Formula
2+
include Language::Python::Virtualenv
3+
4+
desc "Downloads course content fast from Moodle (e.g., lecture PDFs)"
5+
homepage "https://github.com/C0D3D3V/Moodle-DL"
6+
url "https://files.pythonhosted.org/packages/0b/44/9c283a04b0ede0bcaa2f3595b523cb115c662fe349f215631484035126d1/moodle_dl-2.3.13.tar.gz"
7+
sha256 "7a6d813b3241497fb79a34a428aa266b2d2d3c175e05d46752e0a8040adaddce"
8+
license "GPL-3.0-or-later"
9+
10+
bottle do
11+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "4edaba781d9d735a2716e1eb87a7453754556d33293d0dd002840dedaac4f1c9"
12+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "62550b7e608fc4dad74af47a99eae725913d28850f12a781ba2d166fafb9a2af"
13+
sha256 cellar: :any_skip_relocation, arm64_ventura: "6c5967df3f89b9ab620d22f60f2b3bfcb6bb927bc503166000962bd0efcd8953"
14+
sha256 cellar: :any_skip_relocation, sonoma: "9f42ac47c652fb79c1c8142b2e4ae703d2bcfdb32563e6b83720e6fa98e1c247"
15+
sha256 cellar: :any_skip_relocation, ventura: "e6d57095cf2fe5267bd38c73e43bfb6523a2923ac27c558ca4dc6de94fab8169"
16+
sha256 cellar: :any_skip_relocation, x86_64_linux: "17f020ecba04b74fe8bd814888ae07379275625fea606e4a9f5f36b450bc0e10"
17+
end
18+
19+
depends_on "certifi"
20+
depends_on "ffmpeg"
21+
depends_on "[email protected]"
22+
23+
resource "aiodns" do
24+
url "https://files.pythonhosted.org/packages/17/0a/163e5260cecc12de6abc259d158d9da3b8ec062ab863107dcdb1166cdcef/aiodns-3.5.0.tar.gz"
25+
sha256 "11264edbab51896ecf546c18eb0dd56dff0428c6aa6d2cd87e643e07300eb310"
26+
end
27+
28+
resource "aiofiles" do
29+
url "https://files.pythonhosted.org/packages/0b/03/a88171e277e8caa88a4c77808c20ebb04ba74cc4681bf1e9416c862de237/aiofiles-24.1.0.tar.gz"
30+
sha256 "22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c"
31+
end
32+
33+
resource "aiohappyeyeballs" do
34+
url "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz"
35+
sha256 "c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558"
36+
end
37+
38+
resource "aiohttp" do
39+
url "https://files.pythonhosted.org/packages/42/6e/ab88e7cb2a4058bed2f7870276454f85a7c56cd6da79349eb314fc7bbcaa/aiohttp-3.12.13.tar.gz"
40+
sha256 "47e2da578528264a12e4e3dd8dd72a7289e5f812758fe086473fab037a10fcce"
41+
end
42+
43+
resource "aiosignal" do
44+
url "https://files.pythonhosted.org/packages/ba/b5/6d55e80f6d8a08ce22b982eafa278d823b541c925f11ee774b0b9c43473d/aiosignal-1.3.2.tar.gz"
45+
sha256 "a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54"
46+
end
47+
48+
resource "attrs" do
49+
url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz"
50+
sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"
51+
end
52+
53+
resource "cffi" do
54+
url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz"
55+
sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"
56+
end
57+
58+
resource "charset-normalizer" do
59+
url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz"
60+
sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"
61+
end
62+
63+
resource "colorama" do
64+
url "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz"
65+
sha256 "08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"
66+
end
67+
68+
resource "colorlog" do
69+
url "https://files.pythonhosted.org/packages/d3/7a/359f4d5df2353f26172b3cc39ea32daa39af8de522205f512f458923e677/colorlog-6.9.0.tar.gz"
70+
sha256 "bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2"
71+
end
72+
73+
resource "frozenlist" do
74+
url "https://files.pythonhosted.org/packages/79/b1/b64018016eeb087db503b038296fd782586432b9c077fc5c7839e9cb6ef6/frozenlist-1.7.0.tar.gz"
75+
sha256 "2e310d81923c2437ea8670467121cc3e9b0f76d3043cc1d2331d56c7fb7a3a8f"
76+
end
77+
78+
resource "html2text" do
79+
url "https://files.pythonhosted.org/packages/f8/27/e158d86ba1e82967cc2f790b0cb02030d4a8bef58e0c79a8590e9678107f/html2text-2025.4.15.tar.gz"
80+
sha256 "948a645f8f0bc3abe7fd587019a2197a12436cd73d0d4908af95bfc8da337588"
81+
end
82+
83+
resource "idna" do
84+
url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz"
85+
sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"
86+
end
87+
88+
resource "multidict" do
89+
url "https://files.pythonhosted.org/packages/46/b5/59f27b4ce9951a4bce56b88ba5ff5159486797ab18863f2b4c1c5e8465bd/multidict-6.5.0.tar.gz"
90+
sha256 "942bd8002492ba819426a8d7aefde3189c1b87099cdf18aaaefefcf7f3f7b6d2"
91+
end
92+
93+
resource "propcache" do
94+
url "https://files.pythonhosted.org/packages/a6/16/43264e4a779dd8588c21a70f0709665ee8f611211bdd2c87d952cfa7c776/propcache-0.3.2.tar.gz"
95+
sha256 "20d7d62e4e7ef05f221e0db2856b979540686342e7dd9973b815599c7057e168"
96+
end
97+
98+
resource "pycares" do
99+
url "https://files.pythonhosted.org/packages/f5/37/4d4f8ac929e98aad64781f37d9429e82ba65372fc89da0473cdbecdbbb03/pycares-4.9.0.tar.gz"
100+
sha256 "8ee484ddb23dbec4d88d14ed5b6d592c1960d2e93c385d5e52b6fad564d82395"
101+
end
102+
103+
resource "pycparser" do
104+
url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz"
105+
sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"
106+
end
107+
108+
resource "readchar" do
109+
url "https://files.pythonhosted.org/packages/dd/f8/8657b8cbb4ebeabfbdf991ac40eca8a1d1bd012011bd44ad1ed10f5cb494/readchar-4.2.1.tar.gz"
110+
sha256 "91ce3faf07688de14d800592951e5575e9c7a3213738ed01d394dcc949b79adb"
111+
end
112+
113+
resource "requests" do
114+
url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz"
115+
sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422"
116+
end
117+
118+
resource "sentry-sdk" do
119+
url "https://files.pythonhosted.org/packages/04/4c/af31e0201b48469786ddeb1bf6fd3dfa3a291cc613a0fe6a60163a7535f9/sentry_sdk-2.30.0.tar.gz"
120+
sha256 "436369b02afef7430efb10300a344fb61a11fe6db41c2b11f41ee037d2dd7f45"
121+
end
122+
123+
resource "six" do
124+
url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz"
125+
sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"
126+
end
127+
128+
resource "urllib3" do
129+
url "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz"
130+
sha256 "414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466"
131+
end
132+
133+
resource "xmpppy" do
134+
url "https://files.pythonhosted.org/packages/b9/dc/c82cf11d776b371863bef8de412e949467e291977d2aaded91d010713a6f/xmpppy-0.7.1.tar.gz"
135+
sha256 "c5ff61c0fa0ad8b9e521939f944bbcdac0a2375e7ec24201605cc540857e0400"
136+
end
137+
138+
resource "yarl" do
139+
url "https://files.pythonhosted.org/packages/3c/fb/efaa23fa4e45537b827620f04cf8f3cd658b76642205162e072703a5b963/yarl-1.20.1.tar.gz"
140+
sha256 "d017a4997ee50c91fd5466cef416231bb82177b93b029906cefc542ce14c35ac"
141+
end
142+
143+
resource "yt-dlp" do
144+
url "https://files.pythonhosted.org/packages/b7/fb/588a23e61586960273524d3aa726bd148116d422854f727f4d59c254cb6a/yt_dlp-2025.6.9.tar.gz"
145+
sha256 "751f53a3b61353522bf805fa30bbcbd16666126537e39706eab4f8c368f111ac"
146+
end
147+
148+
def install
149+
virtualenv_install_with_resources
150+
end
151+
152+
test do
153+
assert_match version.to_s, shell_output("#{bin}/moodle-dl --version")
154+
155+
(testpath/"config.json").write <<~JSON
156+
{
157+
"token": "invalidtoken",
158+
"privatetoken": "invalidprivatetoken",
159+
"moodle_domain": "localhost",
160+
"moodle_path": "/moodle/"
161+
}
162+
JSON
163+
164+
assert_match "Connection error", shell_output("#{bin}/moodle-dl 2>&1", 1)
165+
assert_path_exists testpath/"moodle_state.db"
166+
end
167+
end

pypi_formula_mappings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,9 @@
570570
"mongo-orchestration": {
571571
"exclude_packages": ["certifi"]
572572
},
573+
"moodle-dl": {
574+
"exclude_packages": ["certifi"]
575+
},
573576
"moto": {
574577
"package_name": "moto[all,server]",
575578
"exclude_packages": ["certifi", "cryptography"]

0 commit comments

Comments
 (0)