scivision / linkchecker-markdown

Python asyncio + aiohttp Markdown *.md URL link checker: 10,000 files/second
MIT License
32 stars 18 forks source link

Add relative path determination and update error output #17

Open TimidRobot opened 3 years ago

TimidRobot commented 3 years ago

Description

Output

The example below includes only a single file, for brevity. If the entire project was scanned, there would be many more errors, but the old output would not indicate which file (all files are named contents.lr).

New Output

Command:

linkcheckMarkdown -ext .lr content/archives/old-tech-blog/entries/issue-tracking-at-codecreativecommonsorg/

Output:

ERROR: 'content/archives/old-tech-blog/entries/issue-tracking-at-codecreativecommonsorg/contents.lr' 'http://code.creativecommons.org/issues' 404
ERROR: 'content/archives/old-tech-blog/entries/issue-tracking-at-codecreativecommonsorg/contents.lr' 'http://learn.creativecommons.org/projects/oesearch' 'Cannot connect to host learn.creativecommons.org:80 ssl:default [nodename nor servname provided, or not known]'
ERROR: 'content/archives/old-tech-blog/entries/issue-tracking-at-codecreativecommonsorg/contents.lr' 'http://code.creativecommons.org/issues/issue7' 404
4.58 seconds to check links

Old Output

Command:

linkcheckMarkdown -ext .lr content/archives/old-tech-blog/entries/issue-tracking-at-codecreativecommonsorg/

Output:


 ('contents.lr', 'http://code.creativecommons.org/issues', 404)

 ('contents.lr', 'http://learn.creativecommons.org/projects/oesearch', ClientConnectorError(ConnectionKey(host='learn.creativecommons.org', port=80, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-5849311230535720466), gaierror(8, 'nodename nor servname provided, or not known')))

 ('contents.lr', 'http://code.creativecommons.org/issues/issue7', 404)
4.65 seconds to check links