Created
January 5, 2023 22:08
Revisions
-
agoose77 created this gist
Jan 5, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ import pathlib import json docs_path = pathlib.Path("docs") output_path = docs_path / "_build" / "linkcheck" / "output.json" with output_path.open() as f: data = [json.loads(l) for l in f] for record in data: if record['status'] != "broken": continue record['path'] = (docs_path / record['filename']) print( "::error file={path},line={lineno}::{uri} URI was {status} (code: {code}): {info}".format_map(record) ) print( "??file={path},line={lineno}??{uri} URI was {status} (code: {code}): {info}".format_map(record) )