clojure-toolbox.com icon indicating copy to clipboard operation
clojure-toolbox.com copied to clipboard

Broken links

Open AndreaCrotti opened this issue 6 years ago • 2 comments

I just noticed a broken link, and since the whole list of projects is in single yaml file, I thought we could simply scan then automatically.

Could be done in any language really, but I just wrote a few lines of Python:

import yaml, requests

for k, v in d.items():
    resp = requests.get(v['url'])
    if resp.status_code != 200:
        print("{} not found".format(k))

speclj not found
lein_diagnostics not found
sayid not found

Could it be automated I think as part of the build process?

AndreaCrotti avatar Feb 01 '19 11:02 AndreaCrotti

Having a script to check dead links is a good idea. Automating it is a touch harder, because you don't want to delete a project if its website is only temporarily down. I think I'd want to make actually removing dead links a manual process.

weavejester avatar Feb 01 '19 16:02 weavejester

Yes well I think the script should not remove things automatically, simply run periodically to check for broken links and send a notification for example. Not sure how to do that as part of this project though, it's a bit tricky.

AndreaCrotti avatar Feb 01 '19 20:02 AndreaCrotti