Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link checker for links in markdown cells #9

Open
psychemedia opened this issue Oct 27, 2021 · 1 comment
Open

Link checker for links in markdown cells #9

psychemedia opened this issue Oct 27, 2021 · 1 comment

Comments

@psychemedia
Copy link
Contributor

Create an automatic link checker for checking links in markdown cells:

  • parse md cells;
  • extract links;
  • check links;
  • generate link report.
@psychemedia
Copy link
Contributor Author

psychemedia commented Oct 27, 2021

Possibly useful: https://github.com/scivision/linkchecker-markdown

Or we can just grab its link extractor:

import re

regex = r"https?://[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[=a-zA-Z0-9\_\/\?\&\%\+\#\.\-]+"
glob = re.compile(regex)
txt="""
sdsd
sd
http://www.open.ac.uk and [](https://bbc.co.uk/dsdsds)"""
urls = glob.findall(txt)
#urls = glob.findall(fn.read_text(errors="ignore"))

urls

Perhaps also make use of https://github.com/innovationOUtside/ouxml-link-checker/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant