Metadata-Version: 2.4
Name: semantic-copycat-purl2notices
Version: 1.2.0
Summary: Generate legal notices (attribution to authors and copyrights) for software packages
Author-email: Oscar Valenzuela B <oscar.valenzuela.b@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/oscarvalenzuelab/semantic-copycat-purl2notices
Project-URL: Repository, https://github.com/oscarvalenzuelab/semantic-copycat-purl2notices
Project-URL: Issues, https://github.com/oscarvalenzuelab/semantic-copycat-purl2notices/issues
Keywords: sbom,license,copyright,attribution,purl,package-url,legal-notices,compliance
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: System :: Software Distribution
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: jinja2>=3.0.0
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: aiofiles>=0.8.0
Requires-Dist: packageurl-python>=0.11.0
Requires-Dist: semantic-copycat-purl2src>=1.1.0
Requires-Dist: semantic-copycat-upmex>=1.5.0
Requires-Dist: semantic-copycat-oslili>=1.3.0
Requires-Dist: python-Levenshtein>=0.20.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: python-magic>=0.4.27
Requires-Dist: tqdm>=4.65.0
Requires-Dist: jsonschema>=4.17.0
Requires-Dist: platformdirs>=3.0.0
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: types-aiofiles; extra == "dev"
Requires-Dist: types-pyyaml; extra == "dev"
Requires-Dist: types-tqdm; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Dynamic: license-file

# PURL2NOTICES - Package URL (PURL) to Legal Notices

Generate legal notices (attribution to authors and copyrights) for software packages.

## Features

- **Multi-format support**: Process PURLs, archives (JAR/WAR/WHL), directories, and cache files
- **12+ ecosystems**: npm, PyPI, Maven, Cargo, Go, NuGet, Conda, and more
- **Smart extraction**: Uses multiple engines (purl2src, upmex, oslili) for accurate license detection
- **Flexible output**: Text/HTML with customizable Jinja2 templates
- **Cache management**: CycloneDX format with merge capabilities
- **Override system**: Customize licenses and filter unwanted content

## Installation

```bash
pip install semantic-copycat-purl2notices
```

For development:
```bash
git clone https://github.com/oscarvalenzuelab/semantic-copycat-purl2notices.git
cd semantic-copycat-purl2notices
pip install -e .[dev]
```

## Quick Start

```bash
# Process a single package
purl2notices -i pkg:npm/express@4.0.0

# Process an archive file
purl2notices -i library.jar -o NOTICE.txt

# Scan a directory
purl2notices -i ./src --recursive -o NOTICE.html -f html

# Process multiple packages
echo "pkg:npm/express@4.0.0" > packages.txt
echo "pkg:pypi/django@4.2.0" >> packages.txt
purl2notices -i packages.txt -o NOTICE.txt
```

## Documentation

- **[User Guide](docs/user-guide.md)** - Complete usage documentation
- **[Examples](docs/examples.md)** - Detailed examples and use cases
- **[Configuration](docs/configuration.md)** - Configuration options and customization

## Common Use Cases

### Generate notices for a project

```bash
purl2notices -i ./my-project --recursive --cache project.cache.json -o NOTICE.txt
```

### Merge notices from multiple sources

```bash
purl2notices -i cache1.json --merge-cache cache2.json -o combined-NOTICE.txt
```

### Customize output with overrides

```bash
purl2notices -i packages.txt --overrides custom.json -o NOTICE.txt
```

## API Usage

```python
from purl2notices import Purl2Notices
import asyncio

processor = Purl2Notices()
package = asyncio.run(processor.process_single_purl("pkg:npm/express@4.0.0"))
notices = processor.generate_notices([package])
print(notices)
```

