Metadata-Version: 2.2
Name: webpage-to-pdf-converter
Version: 1.0.0
Summary: A CLI tool to check URLs and save webpages as PDFs
Author: remixonwin
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: click
Requires-Dist: requests
Requires-Dist: selenium
Requires-Dist: webdriver_manager
Requires-Dist: Pillow
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
Requires-Dist: responses>=0.23.0; extra == "test"

# Webpage2PDF

A CLI tool to check URLs and save webpages as PDFs.

## Installation

```bash
pip install -e .
```

## Installation from PyPI

```bash
pip install webpage-to-pdf-converter
```

## Usage

```bash
webpage-to-pdf https://example.com --save-pdf
```

## Docker

Build the Docker image:
```bash
docker build -t url-checker .
```

### Running with Docker

1. Create a local output directory:
```bash
mkdir -p output
```

2. Run the container with volume mount:
```bash
docker run --rm -v $(pwd)/output:/app/output url-checker https://example.com --save-pdf --output /app/output/webpage.pdf
```

The PDF file will be saved in your local `output` directory. The tool will show both the container path and the absolute path of the generated file:

```
✓ PDF saved successfully as '/app/output/webpage.pdf'
File location: /app/output/webpage.pdf
```

## Using the Program with Docker

After building the image, you can run the container to check a URL directly. For example, to check "https://example.com" and save the webpage as a PDF, run:
```bash
docker run --rm url-checker https://example.com --save-pdf
```

## Release History

- 1.0.0 (2024-03-XX)
  - Initial release
  - URL reachability checking
  - PDF generation from webpages
  - Docker support
  - Chrome/Chromium support

## CI/CD

This project utilizes GitHub Actions for continuous integration.
Refer to [ci.yml](.github/workflows/ci.yml) for workflow details.

## Development

Install development dependencies:
```bash
pip install -e ".[test]"
```

Run tests:
```bash
pytest
```
