Skip to content

Instantly share code, notes, and snippets.

@kayvank
Last active August 1, 2024 12:47
Show Gist options
  • Save kayvank/0d43254416b15dc9c493140c19ccc2a4 to your computer and use it in GitHub Desktop.
Save kayvank/0d43254416b15dc9c493140c19ccc2a4 to your computer and use it in GitHub Desktop.
find-broken-http-links
{ pkgs ? import <nixpkgs> {} }:
let
my-python-packages = ps: with ps; [
requests
beautifulsoup4
uritools
pip
# other python packages
];
my-python = pkgs.python3.withPackages my-python-packages;
in pkgs.mkShell {
buildInputs = [
my-python
pkgs.cowsay
];
shellHook =
''
echo 'to find your broken links: ./brokenlinks.py "http://my-site.html" ' | cowsay
'';
}
@kayvank
Copy link
Author

kayvank commented Aug 24, 2023

usage:
$ nix-shell
$ brokenlinks.py https://docs.cardano.org/introduction > ./report.txt 2>&1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment