Simple URL extractor from text files. Suckless C tool.
sparser scans files for external URLs and prints them to stdout, one per line. It handles HTML, Markdown, MDX, and plain text. Optionally recurses directories and deduplicates output.
sparser [-vuR] [path | -]
-v verbose (print filenames to stderr)
-u deduplicate URLs
-R recursive directory scan
path file or directory to scan
- read from stdin
# Extract URLs from a single file
sparser notes.md
# Recursively scan a directory, deduplicate
sparser -uR ~/documents/
# Pipe from stdin
curl -s https://example.com | sparser -
Edit config.h to adjust file size limits, max URL length, and line buffer size.
A C compiler and POSIX headers.
Edit config.mk to match your local setup, then:
make clean install