{ "name": "monolith", "version": "2.11.2", "summary": "monolith: saves a web page as one HTML file, with its styles, scripts, images and fonts embedded (Rust)", "category": "network", "license": "CC0-1.0", "homepage": "https://github.com/Y2Z/monolith", "source": { "url": "https://github.com/Y2Z/monolith/archive/refs/tags/v2.11.2.tar.gz", "sha256": "0591c98455662deb9cad92d3abf0e26f9133d917a1cc2ea13651bee69f5c9779" }, "watch": {"kind": "github-release", "repo": "Y2Z/monolith", "tag_regex": "^v([0-9]+\\.[0-9]+\\.[0-9]+)$", "revendor": {"tool": "cargo", "lockfile": "Cargo.lock"}}, "vendor": "vendor.txt", "deps": [], "env_packages": [], "static": true, "nss": true, "check": "bin/monolith --version | has -x 'monolith 2.11.2' && t=$(mktemp -d) && mkdir \"$t/w\" && printf 'bvs

BVS monolith

' > \"$t/w/index.html\" && printf 'h1 { color: rgb(1, 2, 3); }\\n' > \"$t/w/style.css\" && printf 'var bvsScript = 42;\\n' > \"$t/w/app.js\" && python3 -c 'import base64, sys; open(sys.argv[1], \"wb\").write(base64.b64decode(\"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\"))' \"$t/w/dot.png\" && P=$(free_port) && { python3 -m http.server -b 127.0.0.1 -d \"$t/w\" \"$P\" > /dev/null 2>&1 < /dev/null & echo $! > \"$t/web\"; } && wait_port \"$P\" && bin/monolith -o \"$t/out.html\" \"http://127.0.0.1:$P/index.html\" 2> \"$t/err\" && has 'BVS monolith' < \"$t/out.html\" && has 'href=\"data:text/css;base64,aDEgeyBjb2xvcjogcmdiKDEsIDIsIDMpOyB9Cg==\"' < \"$t/out.html\" && has 'src=\"data:image/png;base64,iVBORw0KGgo' < \"$t/out.html\" && has 'bvsScript = 42' < \"$t/out.html\" && bin/monolith -j -o \"$t/nojs.html\" \"http://127.0.0.1:$P/index.html\" 2>> \"$t/err\" && ! has bvsScript < \"$t/nojs.html\" && echo \"monolith 2.11.2: a page served on port $P saved as one file with its stylesheet, script and image embedded as data; again without its script (-j)\"; r=$?; [ -f \"$t/web\" ] && kill \"$(cat \"$t/web\")\" 2>/dev/null; [ $r = 0 ] || cat \"$t/err\" >&2; exit $r" }