~kris/hacks

sparser

78c7f82812eacc253dec423b846d08590e9ee347 — Kris Yotam 4 months ago 83b1653 master
convert README.md to README.txt
2 files changed, 55 insertions(+), 47 deletions(-)

D README.md
A README.txt
D README.md => README.md +0 -47
@@ 1,47 0,0 @@
# sparser

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.

## Usage

```
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
```

## Examples

```sh
# 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 -
```

## Configuration

Edit `config.h` to adjust file size limits, max URL length, and line buffer size.

## Requirements

A C compiler and POSIX headers.

## Installation

Edit `config.mk` to match your local setup, then:

```sh
make clean install
```

A README.txt => README.txt +55 -0
@@ 0,0 1,55 @@
sparser


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.


USAGE

  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


EXAMPLES

  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 -


CONFIGURATION

  Edit config.h to adjust file size limits, max URL length, and line
  buffer size.


REQUIREMENTS

  A C compiler and POSIX headers.


INSTALLATION

  Edit config.mk to match your local setup, then:

    make clean install


LICENSE

  MIT