feat(users/Profpatsch/whatcd-resolver): add a simple torrent parser

The `bencode` library is anything but production-grade, but it’s
enough to parse the torrent files generated by Gazelle lol.

This should help with … I haven’t really figured out yet what it helps
with I guess. But it was fun. I like the `Parse` abstraction very
much. It can parse XML and it can parse Bencode. Good.

Change-Id: If1331de423eab3e91ce9db6e2a7eb84da51b18a2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13211
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2025-03-06 23:59:27 +01:00
parent d64c53d051
commit dde78515f6
8 changed files with 245 additions and 8 deletions

View file

@ -65,6 +65,7 @@ library
exposed-modules:
WhatcdResolver
AppT
Bencode
JsonLd
Optional
Http
@ -84,6 +85,7 @@ library
pa-run-command,
aeson-better-errors,
aeson,
bencode,
blaze-html,
bytestring,
case-insensitive,
@ -108,7 +110,9 @@ library
postgresql-simple,
punycode,
tmp-postgres,
time,
unliftio,
selective,
wai-extra,
wai,
warp,