{ "name": "links2", "version": "2.30", "summary": "Links 2: a text-mode web browser with tables, frames and HTTPS (OpenSSL), and gzip, brotli, zstd, bzip2 and xz encodings", "category": "network", "license": "GPL-2.0-or-later", "homepage": "http://links.twibright.com/", "source": { "url": "https://links.twibright.com/download/links-2.30.tar.bz2", "sha256": "c4631c6b5a11527cdc3cb7872fc23b7f2b25c2b021d596be410dadb40315f166" }, "watch": {"kind": "index", "url": "https://links.twibright.com/download/", "regex": "links-([0-9]+\\.[0-9]+)\\.tar\\.bz2"}, "deps": [ "openssl", "zlib", "brotli", "zstd", "bzip2", "xz", "libevent", "cacert" ], "env_packages": [], "static": true, "nss": true, "check": "bin/links -version | has -x 'Links 2.30' && t=$(mktemp -d) && printf '%s' 'bvs

BVS links

first second page

cell-acell-b
' > \"$t/index.html\" && bin/links -dump \"$t/index.html\" > \"$t/d\" && has 'BVS links' < \"$t/d\" && has 'first second page' < \"$t/d\" && has 'cell-a cell-b' < \"$t/d\" && mkdir \"$t/s\" && sed s/BVS/GZIP/ \"$t/index.html\" | gzip -c > \"$t/s/gzip\" && sed s/BVS/BROTLI/ \"$t/index.html\" | bin/brotli -c > \"$t/s/br\" && sed s/BVS/ZSTD/ \"$t/index.html\" | bin/zstd -q -c > \"$t/s/zstd\" && printf '%s\\n' 'import http.server, os, sys' 'class H(http.server.BaseHTTPRequestHandler):' ' def do_GET(self):' ' enc = self.path.strip(\"/\")' ' body = open(os.path.join(sys.argv[2], enc), \"rb\").read()' ' self.send_response(200)' ' self.send_header(\"Content-Type\", \"text/html\")' ' self.send_header(\"Content-Encoding\", enc)' ' self.send_header(\"Content-Length\", str(len(body)))' ' self.end_headers()' ' self.wfile.write(body)' ' def log_message(self, *a):' ' pass' 'http.server.HTTPServer((\"127.0.0.1\", int(sys.argv[1])), H).serve_forever()' > \"$t/srv.py\" && P=$(free_port) && { python3 \"$t/srv.py\" \"$P\" \"$t/s\" < /dev/null & echo $! > \"$t/pid\"; } && wait_port \"$P\" && bin/links -dump \"http://127.0.0.1:$P/gzip\" | has 'GZIP links' && bin/links -dump \"http://127.0.0.1:$P/br\" | has 'BROTLI links' && bin/links -dump \"http://127.0.0.1:$P/zstd\" | has 'ZSTD links' && echo \"links 2.30: a page with a link and a table dumped as text; the same page over HTTP on port $P with gzip, brotli and zstd encodings\"; r=$?; [ -f \"$t/pid\" ] && kill \"$(cat \"$t/pid\")\" 2>/dev/null; exit $r" }