Skip to content

Commit

Permalink
Merge pull request #142 from phanirithvij/linkcheck-minor-fix
Browse files Browse the repository at this point in the history
linkcheck: download xmldump conservatively
  • Loading branch information
Mic92 committed Sep 18, 2024
2 parents 31e229c + 2f1118f commit 4c8b167
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
19 changes: 15 additions & 4 deletions checks/linkcheck/allowed.links
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,30 @@
# %7B is { matches urls inside nix expressions like ${version} etc.
(.*\.(___domain|tld|mydomain|local).*|my.app|%7B)

# xml namespaces need not be retrievable urls https://stackoverflow.com/a/27614076
(qemu/1.0|locating-rules/1.0)

# no need to fetch cache extries
(cache.nixos.org|fzakaria.cachix.org)

# urls in example snippets
# urls in example snippets (url status can be 404)
(USERNAME/nixpkgs|your_username/nixpkgs|fooUser/barRepo|code.visualstudio.com/sha|path/to/patch)

# works in browser
https://www.phoronix.com/news/Mesa-Delete-Clover-Discussion
https://github.com/Artturin/nixpkgs/archive/add-swap-options.tar.gz

# works with git clone
https://review.coreboot.org/coreboot.git

# works as intended
https://one.one.one.one/dns-query

# works in browser
https://www.phoronix.com/news/Mesa-Delete-Clover-Discussion
https://pypi.org/project/stt/#files
https://static-web-server.net/$
https://static-web-server.net/configuration/config-file/
https://static-web-server.net/features/security-headers/

# reddit working posts
reddit.com/r/XMG_gg/comments/ic7vt7/fusion15_linux_how_to_fix_thunderbolttb3_dock_usb
reddit.com/r/NixOS/comments/31lx3i/windows_and_nixos_dual_boot
reddit.com/r/NixOS/comments/nuclde/how_to_properly_set_up_lidclose_behaviour_on_a
5 changes: 3 additions & 2 deletions checks/linkcheck/lychee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ workdir="$SCRIPT_DIR/workdir"
mkdir -p "$workdir"
pushd "$workdir" || exit

curl "https://wiki.nixos.org/wikidump.xml.zst" | zstd -d >wikidump.xml
curl -o wikidump.xml.zst "https://wiki.nixos.org/wikidump.xml.zst" -z wikidump.xml.zst
<wikidump.xml.zst zstd -d >wikidump.xml

# filter unimportant pages like User:* Talk:*
python3 ../main.py filter wikidump.xml wikidump-filtered.xml
Expand All @@ -17,7 +18,7 @@ python3 ../main.py filter wikidump.xml wikidump-filtered.xml
python3 ../main.py badlinks ../allowed.links exclude-args

extrargs=(
# exlude sending requests to the wiki
# exclude sending requests to the wiki
"--exclude" "wiki.nixos.org/wiki"
# default is too high
"--max-concurrency" "16"
Expand Down

0 comments on commit 4c8b167

Please sign in to comment.