Metadata-Version: 2.4
Name: permalint
Version: 0.1.11
Summary: Lint URLs
Project-URL: Homepage, https://github.com/sanchitram/permalint
Project-URL: Repository, https://github.com/sanchitram/permalint
Project-URL: Source, https://github.com/sanchitram/permalint
Author-email: Sanchit Ram Arvind <sanchitram@gmail.com>
Requires-Python: >=3.9
Requires-Dist: ruff~=0.0
Requires-Dist: tldextract>=5.3.0
Description-Content-Type: text/markdown

# permalint

Lint URLs (mostly for teaxyz/chai, but hopefully other uses too)

## Features

- Ignores protocol (http, https, etc.)
- Normalizes GitHub URLs to owner/repo
- Removes query strings and fragments
- Lowercases domains and removes www

## Usage

```python
from permalint import normalize_url

url = "https://github.com/user/repo?utm_source=foo#readme"
print(normalize_url(url))  # Output: github.com/user/repo
```

## Development

- Install dependencies: `pkgx rye sync`
- Run tests: `pkgx rye run pytest`
- Lint: `pkgx ruff check src/`
- Type check: `pkgx ty src/`

## Contributing / Wishlist

- `guess-canonical-url` to guess the correct URL based on a passed list of URLs
- actual source of Homepages for
