Skip to content

ssinuco/clojure-md-links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mardown-links-extractor

A CLI which extracts and validates links from markdown files in a directory a subdirectory.

md-links <path-to-file> [options]

If we pass the --validate option, the module must make an HTTP request to find out if the link works or not. If the link results in a redirect to a URL that responds ok, then we will consider the link as ok.

Implementation details

commonmark-java library is used for parsing the markdown files. This library provides AbstractVisitor Class which is extended in clojure by LinkVisitor

Each markdown file is processed in a thread using a clojure future. Each link is validated in a thread using a clojure future. In both cases, clojure promises are used to provide result when a operation finished.

Examples

Help message

Help message

Process a single file and validate links

Single file with validatio

Process a single file and no validate liks

Single file with no validation

Process a directory and validate links

Process a directory with validation

Process a directory and no validate links

Process a directory with no validation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors