guix-epistemia

Personal Guix channel
Log | Files | Refs

commit 65fb32365c58dd45218893e13a229850f2407852
parent 57ac82c11b2ae99fc48313a0d31288f3608f53c0
Author: Vineet Kumar <git@vineetk.net>
Date:   Fri, 20 Nov 2026 05:27:35 +0100

packages/emacs: add anubis-solver package for eww

Diffstat:
Mepistemia/packages/emacs.scm | 42++++++++++++++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)

diff --git a/epistemia/packages/emacs.scm b/epistemia/packages/emacs.scm @@ -131,13 +131,51 @@ kaolin-themes-hl-line-colored t).") (arguments '(#:include '("^[^/]*.el$"))) (home-page "https://git.vineetk.net/pulpie-eww.el") - (synopsis "replacing eww-readable with pulpie-orange-small -") + (synopsis "replacing eww-readable with pulpie-orange-small") (description "Replacement function for the heuristics-based eww-readable-dom with https://huggingface.co/feyninc/pulpie-orange-small, a EuroBERT-based 210M-parameter classifier that extracts the main content from HTML.") (license license:gpl3))) +(define-public emacs-anubis-solver + (package + (name "emacs-anubis-solver") + (version "1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "ssh://anongit@vineetk.net/anubis-solver") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ii13rsx22wy6ibz9gj8syd7araqrqdc7milccq48jrm63r6y0j4")))) + (build-system emacs-build-system) + (arguments + '(#:include '("^[^/]*.el$"))) + (home-page "https://git.vineetk.net/anubis-solver") + (synopsis "pass techarohq anubis challenges with elisp in eww") + (description "\ +Anubis (https://github.com/techarohq/anubis) answers a request it dislikes +with a page whose <head> contains the challenge parameters in plaintext: + + <script id='anubis_challenge' type='application/json'> + {'rules':{'algorithm':'fast','difficulty':4}, + 'challenge':{'randomData':'...','id':'...','issuedAt':'...'}} + </script> + +The answer is a proof of work, which doesn't require js. This file +fetches the challenge page, extracts the challenge itself, solves it, +redeems, and saves the cookie. + +A challenge can only be told from the response, so the advice runs +around `url-retrieve-synchronously' and `eww-retrieve' instead of +replacing them: the caller's request goes out unchanged and the +response is searched for `anubis--marker-re'. + +The jackal girl will no longer hold my emacs browser hostage with js.") + (license license:gpl3))) + (define-public emacs-org-dev (package (inherit emacs-org)