Skip to content

Commit 0bf9999

Browse files
marcfrederickchenrui333
authored andcommitted
moodle-dl 2.3.13 (new formula)
moodle-dl: update to use pypi and add mappings config Signed-off-by: Rui Chen <[email protected]>
1 parent 0e0cc60 commit 0bf9999

File tree

3 files changed

+162
-0
lines changed

3 files changed

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